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. (Using translation from Muslim 1501a)
أَنَّ رَسُولَ اللهِ ﷺ قَالَ «مَنْ أَعْتَقَ شِرْكًا لَهُ فِي عَبْدٍ فَكَانَ لَهُ مَالٌ مَا يَبْلُغُ ثَمَنَ الْعَبْدِ قُوِّمَ عَلَيْهِ قِيمَةُ الْعَبْدِ فَأُعْطِيَ شُرَكَاؤُهُ حِصَصَهُمْ وَعُتِقَ الْعَبْدُ وَإِلَّا فَقَدْ عُتِقَ مِنْهُ مَا عُتِقَ»