Sahih Muslim, Book 27, Hadith 74 (Muslim 4288)

'Abdullah b. 'Umar reported Allah's Messenger (ﷺ) as saying:

He who gives up his share in a slave, and he has money enough to meet the full price, a fair price for him should be fixed; otherwise be has emancipated him to the extent that he has emancipated.