Other news links say he was hit in the legs.
I've got two words for that:
"Femoral artery", hit that and you're dead!
While that may be true, it is not the preferred way to stop an attack. While the perpetrator is bleeding out he may well kill you.
I was taught: two to the center of mass, then evaluate the threat, and follow with a shot between the eyes. The change in tactic is due to the possibility that the person is wearing body armor or clothing which is reducing the effectiveness of the bullets.
Legally, one is justified in shooting to stop an attack. If the shots also kill the attacker that is merely an unintended side effect.