It is narrated from Sayyiduna Abdullah bin Umar (may Allah be pleased with them) that the Messenger of Allah (peace and blessings be upon him) said: "Whoever sells a slave and the slave has some property, then the property belongs to the seller, unless the buyer stipulates that the property will be his."
Hadith Referenceالسنن المأثورة / باب في البيوع / 185
Hadith Takhrijصحیح بخاری، المساقاة، باب الرجل يكون له ممرا وشرب ....... الخ، رقم : 2379 ، صحیح مسلم البيوع، باب من باغ نخلاً عليها ثمر، رقم : 1543 ۔