Sahih Bukhari | Volume 3 | Hadith Number 697

Narrated by 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."