A man from the Ansar freed six slaves of his upon his death, and he had no other wealth besides them. News of this reached the Prophet ﷺ, who spoke harshly about what he had done. He then summoned the slaves, divided them into groups, and drew lots between them. He freed two and kept four in slavery.
حدثنا قتيبة حدثنا حماد بن زيد عن أيوب عن أبي قلابة عن أبي المهلب
أن رجلا من الأنصار أعتق ستة أعبد له عند موته ولم يكن له مال غيرهم فبلغ ذلك النبي ﷺ فقال له قولا شديدا ثم دعاهم فجزأهم ثم أقرع بينهم فأعتق اثنين وأرق أربعة
Muslim also reported it in the Book of Oaths, chapter "One who frees his share of a jointly owned slave," hadith no. 1668, from Qutayba with the same chain.There is also a narration on this subject from Abu Hurairah [Bayhaqi: 10/286].