Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
malik:38-11

Malik related to me that he had heard that al-Maqburi said that Abu Hurayra was asked whether a man who had to free a slave, could free an illegitimate child to fulfil that obligation. Abu Hurayra said, "Yes. That will give satisfaction for him."  

مالك:٣٨-١١

وَحَدَّثَنِي مَالِكٌ أَنَّهُ بَلَغَهُ عَنِ الْمَقْبُرِيِّ أَنَّهُ قَالَ سُئِلَ أَبُو هُرَيْرَةَ عَنِ الرَّجُلِ تَكُونُ عَلَيْهِ رَقَبَةٌ هَلْ يُعْتِقُ فِيهَا ابْنَ زِنًا فَقَالَ أَبُو هُرَيْرَةَ نَعَمْ ذَلِكَ يُجْزِئُ عَنْهُ