Al-Aswad bin Yazid narrated from Sayyiduna Ibn Mas'ud (may Allah be pleased with him) that when a slave is freed, he draws to himself the wala of his children. Qadi Shurayh (may Allah have mercy on him) used to give the judgement for the child's wala in favour of those who had freed his mother; then al-Aswad told Qadi Shurayh (may Allah have mercy on him) the statement of Ibn Mas'ud (may Allah be pleased with him), and he judged according to it.
This is how Jabir al-Ju'fi narrated it, from al-Sha'bi, from al-Aswad.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الولاء / 21524