Hadith 1288B4

. قَالَ مَالِك، فِي الْأَمَةِ تُعْتَقُ وَهِيَ حَامِلٌ وَزَوْجُهَا مَمْلُوكٌ، ثُمَّ يَعْتِقُ زَوْجُهَا قَبْلَ أَنْ تَضَعَ حَمْلَهَا أَوْ بَعْدَمَا تَضَعُ : إِنَّ وَلَاءَ مَا كَانَ فِي بَطْنِهَا لِلَّذِي أَعْتَقَ أُمَّهُ، لِأَنَّ ذَلِكَ الْوَلَدَ قَدْ كَانَ أَصَابَهُ الرِّقُّ قَبْلَ أَنْ تُعْتَقَ أُمُّهُ، وَلَيْسَ هُوَ بِمَنْزِلَةِ الَّذِي تَحْمِلُ بِهِ أُمُّهُ بَعْدَ الْعَتَاقَةِ، لِأَنَّ الَّذِي تَحْمِلُ بِهِ أُمُّهُ بَعْدَ الْعَتَاقَةِ إِذَا عَتَقَ أَبُوهُ جَرَّ وَلَاءَهُ .
Imam Malik, may Allah have mercy on him, said that if a pregnant slave woman is set free and her husband is a slave, then the husband is also set free either before or after she gives birth, the wala' (right of inheritance) of the child will go to the mawla (patron) of the mother, because this child became her slave before her emancipation. However, any pregnancy that occurs to this woman after her emancipation, its wala' will go to the father when he is set free. Imam Malik, may Allah have mercy on him, said: If a slave, with the permission of his mawla, sets his own slave free, then the wala' will go to the mawla, not to the slave, even if he is set free.
Hadith Reference موطا امام مالك رواية يحييٰ / كتاب العتق والولاء / 1288B4
Hadith Takhrij «فواد عبدالباقي نمبر: 38 - كِتَابُ الْعِتْقِ وَالْوَلَاءِ-ح: 21ق»