The D.C. government has decided not to fire a Department of Corrections budget official who last November publicly questioned Mayor Marion Barry's estimates of overspending in that agency.

City Administrator Elijah B. Rogers said Michael Hagstad, chief of the department's budget and data analysis section, "has learned his lesson. He indicated to me that he did speak inappropriately without having all the facts before him. He did apologize to me," Rogers said.

Hagstad, a employe of the department for 10 years, was quoted by name in the Nov. 21 editions of The Washington Post, along with other named and unnamed city employes, disputing Barry's contentions that their departments were contributing to about $58 million in overspending by agencies.

"I check those numbers every day," Hagstad said at the time, "and we don't show any deficit for this year. If they can go and put out numbers without talking to people first and making sense, then I feel free to say somebody must be playing games."

Following publication of the article, Hagstad was told by city officials that he would be fired for incompetence for giving what the officials said was incorrect information to the media.

Yesterday, Hagstad declined to speak with a reporter. Friends said he was given a letter of reprimand but lost no work or pay over the issue. Two other employes, who were told they would be suspended for two weeks, were not suspended, Rogers said.

Barry used the Hagstad episode to tell reporters that he wanted his administration to "speak with one voice" and that he was imposing "discipline" on employes.

Rogers said yesterday that the Hagstad issue was "never one over the right of any employe to speak to the press. The issue is that one . . . ought to give out accurate information. He's working and we're all moving forward."