David McBride was jailed after pleading guilty to leaking military secrets about Afghanistan.