The odds of someone conveniently targeting an aggressive dog at random just as it's attacking a child and not realizing a probable sequence of events for dog + child in the near future are pretty small, assuming person in question is still able to think in coherent fashion. It's not unreasonable to instead conclude that he took an opportunity where living out his fantasy to blast some bullets into the animal would finally not be condemned.
If said person otherwise shows restraint and doesn't kill dogs, I'm not convinced he is actually less of a hero than someone who just acted in the moment to save the baby. If we're seeing the same outcome and same actions ultimately chosen in each context before and after, it's not clear why he should be penalized relative to other people for his motivations, whether stated or just suspected.
If he's not competent and just happened to roll lotto-ticket odds on the timing of his random killing then it's unlikely his future behaviors (or previous ones, for that matter) will be consistent with anything praiseworthy.