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