Sahih Muslim, Book 27, Hadith 72 (Muslim 4286)

Ibn 'Umar reported Allah's Messenger (ﷺ) as saying:

He who gives up his share in a slave, and has enough money to pay the full price of the slave, then full emancipation devolves upon him; but if he has not the money, then he emancipated what he emancipated.