The Messenger of Allah ﷺ said, "Whoever frees his share in a slave, if he has enough wealth to cover the slave's full price, the slave shall be valued at a fair price, his partners shall be given their shares, and the slave shall be set free. Otherwise, only that portion which has been freed is freed."
حدثنا إسحاق أخبرني مالك عن نافع
أن رسول الله ﷺ قال من أعتق شركا في عبد فكان له مال يبلغ ثمن العبد فإنه يقوم عليه قيمة عدل فيعطى شركاؤه حصصهم وعتق العبد عليه وإلا فقد عتق ما عتق
Its isnad is sahih, and it is in Muwatta 2:2, but Malik mentioned it there as "from Abdullah bin Umar" with "from Nafi" omitted, which is a printing error, and the correct version is confirmed in Sharh Zarqani 3:247. It has already preceded with this same isnad from Malik at 397, and it has also appeared repeatedly, at length and in brief, without Malik's narration, the last of which was 5821.