Sahih Muslim Book 009, Hadith Number 3584.
Chapter: The right of inheritance of property vests with one who emancipates the slave.
Ibn Umar reported that 'Aisha decided to buy a slave-girl and then set her free, but her masters said: We are prepared to sell her to you on the condition that her right of inheritance would vest with you. She (Hadrat 'Aisha) made a mention of that to Allah's Messenger (may peace be upon him) whereupon he said: This should not stand in your way. The right of inheritance vests in one who emancipates.