A man from the Ansar declared his slave to be freed upon his death, but he died leaving no wealth besides this slave. So the Prophet ﷺ sold the slave, and Naeem bin Abdullah bin Nahham purchased him.Jabir said, "He was a Coptic slave who died in the first year of Ibn Zubayr's rule."
حدثنا ابن أبي عمر حدثنا سفيان بن عيينة عن عمرو بن دينار
أن رجلا من الأنصار دبر غلاما له فمات ولم يترك مالا غيره فباعه النبي ﷺ فاشتراه نعيم بن عبد الله بن النحام قال جابر عبدا قبطيا مات عام الأول في إمارة ابن الزبير
Agreed upon by Bukhari and Muslim. Muslim, chapter on the permissibility of selling a mudabbar (a slave promised freedom upon his master's death), no. 997/59, from the hadith of Sufyan bin Uyayna, and Bukhari, no. 6716, from the hadith of Amr bin Dinar, with the same wording.