Life or Death
Rabbi Shimon Efrati describes an agonizing dilemma the Jews faced during that time:

Question: In a bunker in a hiding place [probably Warsaw], an entire community of Jews sat... And at the time that the evildoers [the Nazis] had set up searches to find these unfortunate people, an infant who was among those hiding began to cry, and there was no way to silence him. Were his voice heard outside, all would have been discovered and killed. The question was asked whether it was permitted to place a pillow in the mouth of the infant in order to silence him. In this situation, there was a worry that the child would be smothered. During the course of the discussion, one individual got up and put the pillow over the mouth of the infant. And after the cursed evildoers had left, the community approached to remove the pillow and saw, to their consternation, that the child had been suffocated.

And the question was, therefore, whether it had been permitted to place the pillow in order to save the rest of the people. Or if there was no justification for this, and the man who had done so, even by accident, was required to repent for his sin to be absolved.

Answer: The action was correct