It is narrated from al-Hasan (may Allah have mercy on him) that he said concerning the child born of fornication that freeing him and others is the same.
(b) Firas narrates from al-Sha'bi (may Allah have mercy on him): Whichever of them is higher in price.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الأيمان / 20002