Hajjaj bin Artah narrated from Wabarah that Qadi Shurayh used to judge that when a slave marries a free woman and they have children, the wala belongs to their mother. He was told that Sayyiduna Umar (may Allah be pleased with him) used to say that when the father is freed, the wala passes to those who freed the father. So Qadi Shurayh abandoned his view.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الولاء / 21526