Petrayis got jail and fined for this, right?
No, Petraeus got fined but no jail time, only probation.
Also, Petraeus was not handling classified information in a way that RISKED a leak. He outright gave the stuff to his biographer (i.e., the woman with whom he was committing adultery).