Releasing the Pentagon papers was illegal, but Ellsberg's prosecutors messed up, violated the law in a number of ways themselves, so he got off.
The way to whistleblow legally is either to carefully go over the material and only release parts that are illegal, or report it to the higher authorities instead of the public.
The way to whistleblow legally is either to carefully go over the material and only release parts that are illegal, or report it to the higher authorities instead of the public.