Sahih Muslim 1501 a
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
مَنْ أَعْتَقَ شِرْكًا لَهُ فِي عَبْدٍ فَكَانَ لَهُ مَالٌ يَبْلُغُ ثَمَنَ الْعَبْدِ قُوِّمَ عَلَيْهِ قِيمَةَ الْعَدْلِ فَأُعْطِيَ شُرَكَاؤُهُ حِصَصَهُمْ وَعَتَقَ عَلَيْهِ الْعَبْدُ وَإِلاَّ فَقَدْ عَتَقَ مِنْهُ مَا عَتَقَ"
Ibn Umar (Allah be pleased with them) reported Allah's Messenger ﷺ) as saying:
If anyone emancipates his share ina slave and has enough money to pay the full price for him, a fair price for the slave should be fixed, his partners given their shares, and the slave be thus emancipated, otherwise he is emancipated only to the extent of the first man's share.
Full reference and source
Sahih Muslim 1501 a In-book : Book 20, Hadith 1 USC-MSA web (English) : Book 9, Hadith 3578 (deprecated)
View source on Sunnah.com (opens in a new tab)