who did sherlock shoot at the end of season 3
His Last Vow Sherlock offers to trade Magnussen's information on Mary for the state secrets contained in Mycroft's laptop. However, Magnussen is aware that Sherlock is setting him up in a trap. Magnussen then explains Sherlock's plan to John: security services looking for the laptop using a GPS tracker it contains will raid Appledore and, upon finding the laptop, will have a legal reason to search the blackmail vaults. Magnussen, with visible joy, reveals that the plan will not work because Appledore's vaults don't physically exist, but are stored in his mind palace. By giving Magnussen the laptop, Sherlock and John are now guilty of attempting to sell government secrets and can be imprisoned for high treason, whereas Magnussen remains legally untouchable. When Mycroft and the police arrive, Sherlock coldly shoots Magnussen in the head, having realised that this is the only way to free his friends and everyone else from his power.