Sahih Muslim , Book 15, Hadith 4102 (USC-MSA) ⓘ
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.
حَدَّثَنَا يَحْيَى بْنُ يَحْيَى، قَالَ قُلْتُ لِمَالِكٍ حَدَّثَكَ نَافِعٌ، عَنِ ابْنِ عُمَرَ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم " مَنْ أَعْتَقَ شِرْكًا لَهُ فِي عَبْدٍ فَكَانَ لَهُ مَالٌ يَبْلُغُ ثَمَنَ الْعَبْدِ قُوِّمَ عَلَيْهِ قِيمَةَ الْعَدْلِ فَأَعْطَى شُرَكَاءَهُ حِصَصَهُمْ وَعَتَقَ عَلَيْهِ الْعَبْدُ وَإِلاَّ فَقَدْ عَتَقَ مِنْهُ مَا عَتَقَ " .
also referenced under: Book 27, Hadith 73 (In-Book) & Hadith 1501 (Reference)