Abd al-Rahman bin Abi al-Zinad narrates from his father, and he from the jurists whose word is relied upon, that when a child becomes the owner of the father, the father becomes free; and if the father becomes the owner of the child, the child becomes free. But concerning other relatives they differ.
The Qadi (may Allah have mercy on him) said: Ibn Abi al-Zinad narrates from his father that when a man buys a share of his father or his mother, that share becomes free and the value of the remainder is charged to him, so that the whole person is freed at his expense. And if he inherited a share of him without buying it, that share becomes free and the remainder is not charged to him.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب العتق / 21425