the Messenger of Allah ﷺ was asked about illegitimate children. He said: “Two sandals in which I wage Jihad are better than freeing an illegitimate child.”
عَنْ مَيْمُونَةَ بِنْتِ سَعْدٍ مَوْلاَةِ النَّبِيِّ ﷺ أَنَّ رَسُولَ اللَّهِ ﷺ سُئِلَ عَنْ وَلَدِ الزِّنَا فَقَالَ نَعْلاَنِ أُجَاهِدُ فِيهِمَا خَيْرٌ مِنْ أَنْ أُعْتِقَ وَلَدَ الزِّنَا