Maliks Muwatta Book 16, Hadith Number 39.
Section : Contentment in the Face of Misfortune.
Yahya related to me from Malik from Muhammad ibn Abi Bakr ibn Amr ibn Hazm from his father from Abu’n-Nadr as-Salami that the Messenger of Allah, may Allah bless him and grant him peace, said, “If three of a muslim’s children die, and he remains content with that, they will be a protection for him from the Fire.” A woman who was with the Messenger of Allah, may Allah bless him and grant him peace, said, “Or two, Messenger of Allah?”, and he said, “Or two.”