David Petraeus comes to mind.
Petraeus was head of CIA. Not in the military at the time. But, his paramour was. She nor he were charged with leaking classified materials.