It is narrated from Sayyiduna Sa'b bin Jaththamah (may Allah be pleased with him) that he said: O Messenger of Allah, in night raids we strike the children of the polytheists too (so what is the ruling on this)? He (peace and blessings be upon him) said: "Do not do that again, and there is no blame (in what has already happened), for their children are also of them." And he (peace and blessings be upon him) forbade the killing of women and children.
Hadith Referenceالمعجم الكبير للطبراني / باب الصاد / 7424