According to Vanity Fair, Mark Felt kept mum about being Deep Throat in part because he wondered "what the judge might think"—i.e., he feared prosecution. Exasperatingly, the article's author, John D. O'Connor, never outlines the legal issues surrounding the disclosure of information about an ongoing criminal investigation—even though O'Connor is Felt's lawyer. Maybe he wants to keep his powder dry, in the highly unlikely event that a prosecutor should want to indict a 91-year-old man for behavior widely deemed patriotic.
Were Felt's actions potentially illegal? I posed that question to Michael R. Bromwich, who was inspector general at the Justice Department from 1994 to 1999. (He is now at Fried, Frank, Harris, Shriver & Jacobson.) He answered yes.
The likeliest statute under which Felt could have been prosecuted would have been Title 18 USC §641, which prohibits theft of public money, property, or records. The statute is a nasty piece of work, prohibiting not just theft but government leaks. (The relevant language is "conveys or disposes of any record … or thing of value of the United States." Never mind that the people to whom the leaks are "conveyed" are the very taxpayers who paid for the information to be gathered in the first place.) The statute was on the books in the early 1970s when Felt did his leaking; moreover, Bromwich points out, until 1997 the FBI was exempt from laws that protected government whistle-blowers. If convicted under Title 18 USC §641, Felt could have been imprisoned for up to 10 years.
But note that I write in the past tense. It's "could have been" rather than "can be" because there's a five-year statute of limitations on USC §641. Felt has been free and clear since the late 1970s.
If Felt were doing his leaking today and came forward to identify himself as the leaker, he would potentially be in much bigger trouble, according to Bromwich:
Today, disclosure of investigative information might well run afoul of provisions of the Privacy Act (first enacted in its current form in 1988), and [the] grand jury secrecy provisions (Rule 6(e)) of the Federal Rules of Criminal Procedure (which [were] strengthened considerably in the late '70s).
Felt was not a grand juror, but Rule 6(e) covers not just grand jurors but also government officials who are made privy to the information in question.