Al-Zuhri and al-Hasan (may Allah have mercy on them) said concerning a man who said to his slave woman: "You are free, but not what is in your womb": Both she and what is in her womb are free; his exception does not count. Ma'mar said: Someone who asked al-Hakam told me that he said the same.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب العتق / 21367
Ibn Jurayj (may Allah have mercy on him) says: I said to Ata (may Allah have mercy on him): A free man married a slave woman, and she became pregnant; I then freed the child in her womb. To whom does the wala' (right of patronage) belong? He said: "To the one who freed him, but his inheritance goes to his father, because lineage takes precedence over wala'."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب العتق / 21368