A scientist works for the truth. Every scientific discovery reveals a certain truth of nature. So, any discovery, bad or good for mankind, must be made public.
But with that being said, we cannot afford to be blind to consequences. Before disclosing it we must ascertain the degree of good or bad consequences it will have. If we know that a certain discovery has nothing but dangerous consequences to offer to the mass, the discovery is best kept limited only to the knowledge of the scientist and researches working on it. This way the discovery can help societies in the long run without completely destroying it now.