Sahih al-Bukhari, Book 49, Hadith 5 (In-Book) ⓘ
Narrated Ibn `Umar: The Prophet said, "Whoever manumits a slave owned by two masters, should manumit him completely (not partially) if he is rich after having its price evaluated."
حَدَّثَنَا عَلِيُّ بْنُ عَبْدِ اللَّهِ، حَدَّثَنَا سُفْيَانُ، عَنْ عَمْرٍو، عَنْ سَالِمٍ، عَنْ أَبِيهِ ـ رضى الله عنه ـ عَنِ النَّبِيِّ صلى الله عليه وسلم قَالَ " مَنْ أَعْتَقَ عَبْدًا بَيْنَ اثْنَيْنِ، فَإِنْ كَانَ مُوسِرًا قُوِّمَ عَلَيْهِ ثُمَّ يُعْتَقُ " .
also referenced under: Hadith 2521 (DarusSalam) & Volume 3, Book 46, Hadith 697 (USC-MSA)