If Fleischer had done something illegal, resigning his position as press secretary wouldn't have protected him from prosecution.
but it would have allowed him to retain his rights in the GJ. he could never have gotten immunity for testimony, while an active member of the administration.