Defense analyst sentenced to prison for media leaks