Sunan an-Nasa'i, Volume 3, Book 21, Hadith 1876 (DarusSalam)

It was narrated from Abu Hurairah that the Messenger of Allah said: "No Muslim, three of whose children die, will be touched by the Fire, except in fulfillment of the (Divine) oath."

أَخْبَرَنَا قُتَيْبَةُ بْنُ سَعِيدٍ، عَنْ مَالِكٍ، عَنِ ابْنِ شِهَابٍ، عَنْ سَعِيدٍ، عَنْ أَبِي هُرَيْرَةَ، أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم قَالَ ‏ "‏ لاَ يَمُوتُ لأَحَدٍ مِنَ الْمُسْلِمِينَ ثَلاَثَةٌ مِنَ الْوَلَدِ فَتَمَسَّهُ النَّارُ إِلاَّ تَحِلَّةَ الْقَسَمِ ‏" ‏ ‏.‏

sunnah.com