Surely a person's punishment for leaking classified material should not be greater when they act for selfless reasons (however misguided) rather than personal gain. So, why do Chelsea Manning and Edward Snowden get the book thrown at them and General David Petraeus is let off with a fine and a promise not to do it again? Michael Bradley writes.

David Petraeus: four star general in the US Army, former commander of coalition forces in Iraq and commander of US forces in Afghanistan, former CIA Director, 37 years of military service, a PhD in international relations and three honorary doctorates, and a chest-full of medals. He rewrote the book on counter-insurgency operations in urban areas. Good hair too; he could've been a President.

Chelsea (formerly Bradley) Manning: US Army private, three years of military service. Dishonourably discharged and now serving 35 years in prison for criminal espionage.

Edward Snowden: former CIA employee and contractor to US National Security Agency. Wanted by the US government for espionage and theft of government property. Currently living in Russia under President Putin's protection.

Each of these people, from positions of responsibility within the US military or security establishment, released classified material to third parties.

There are two significant differences between their stories. The first is their motivation for their acts. Manning and Snowden leaked enormous volumes of classified material, not for espionage purposes (they weren't spies) nor for personal gain, but solely because they felt it was the right thing to do. That doesn't mean it was right, and I'm not expressing an opinion on their justification. The government secrets they exposed ranged from the embarrassing and scandalous (such as the NSA's illegal mass surveillance program and Australia's bugging of the Indonesian President's phone) to the dangerous (for example, disclosure of surveillance techniques which may have tipped off terror groups to change their communication methods). Good idea or bad, Manning and Snowden felt their government was doing things which needed to be exposed, and in their minds they acted altruistically in making that happen.

Petraeus, on the other hand, handed to his mistress (who was also writing his biography) eight "black books", which he had kept while commanding in Afghanistan, and which contained information including classified notes, the identities of covert officers, details about US intelligence, code words and accounts of his meetings with President Obama. He then lied to the FBI about it. It wasn't until after the FBI found the books (which he had since retrieved) in an unlocked drawer at his home that he admitted what he had done.

The material Petraeus handed over included, by his admission, information of the highest top-secret status. In intelligence terms, a treasure trove, and its public disclosure would have been ruinous to the USA's interests. Fortunately, none of it was ever made public. As for Petraeus's motivation, well, it was personal gain of the basest kind. He certainly didn't suggest he was acting in the public interest.

There's a second difference between these cases. As noted, Manning got 35 years and Snowden faces 30 years if the Americans ever get their hands on him. Petraeus, by contrast, has reached a plea bargain with US prosecutors under which he will plead guilty to a misdemeanour with a recommended penalty of two years' probation and a $40,000 fine. No jail time.

It surely can't be that a person's punishment for leaking classified material should be greater when they acted for selfless reasons, however misguided, than if their motivation was personal gain (money, sex). So, why do Manning and Snowden get the book thrown at them and Petraeus is let off with a fine and a promise not to do it again? After all, while the volume of his disclosures was nowhere near the scale of theirs, the actual information was far more sensitive and potentially damaging. There isn't a "pillow talk" defence in US criminal law, so why isn't he in Leavenworth doing 30 years too?

Necessarily, this takes us to the other differences between the wrongdoers. Four star general and national hero in one corner; army private and low level IT contractor in the other. If Petraeus's black books had been pinched by his chauffeur and lent by him to his girlfriend, the chauffeur would be in prison forever.

It's not really much of a revelation to say that the criminal law is applied unequally. We see it all the time in relation to corporate crime in particular. There's a bizarre double standard frequently applied which goes along the lines that people of "standing" have more reputation to lose, therefore they suffer worse punishment when their crimes are revealed because they are falling from such a great height. Consequently, any sentence imposed on them should be discounted to take the public shame and disgrace into account. It seems that this logic must have been applied by prosecutors in the case of Petraeus, because they could not have had any doubt about securing a conviction.

Well, what a load of crap. Rather than acting as a mitigating factor, Petraeus's record and reputation should, if anything, have aggravated his punishment. What deterrent effect is this plea deal going to have on others with the same kind of privileged access to state secrets? Apparently, if you give it to your girlfriend, that's a misdemeanour. But hand it to WikiLeaks and you're a traitor. There's a perverted morality at play here.

Outcomes like this can only shake everyone's faith in the necessary fiction that justice is blind. It's too frequently not.

Michael Bradley is the managing partner of Marque Lawyers, a boutique Sydney law firm.