A wrong or evil result brought about because of some morally right action (undertaken with intention to do good) is not itself blameworthy. Sometimes it is permissible to perform an action that has, besides its desired (good) effects, a second effect that it would be impermissible to bring about, either as an end or as a means.
THE PRINCIPLE OF DOUBLE EFFECT