It is narrated from Abdullah bin Shaddad that the daughter of Sayyiduna Hamza (may Allah be pleased with him) freed her slave. That slave passed away, leaving behind his daughter and his mistress, the daughter of Hamza. So the Messenger of Allah (peace and blessings be upon him) divided his inheritance equally, half to his daughter and half to his mistress.
Hadith Referenceسنن دارمي / من كتاب الفرائض / 3046
Hadith Gradingتحقیق (حسین سلیم أسد الدارانی):إسناده ضعيف لضعف أشعث وهو: ابن سوار وهو مرسل أيضا، [مكتبه الشامله نمبر: 3056]
Hadith Takhrijاشعث بن سوار کی وجہ سے اس حدیث کی سند ضعیف ہے، لیکن دوسری اسانید سے یہ حدیث صحیح ہے۔ دیکھئے: [ابن ماجه 2734] ، [ابن أبى شيبه 11183، 11184] ، [عبدالرزاق 16210] ، [ابن منصور 174] ، [طبراني 355/24، 880] ، [الحاكم 66/4] ، [البيهقي 241/6]
Brief Explanation
(Commentary on Hadiths 3043 to 3046)
From this it is understood that whatever remains from the heirs of a freed slave or slave-girl, its inheritor will be the master (male or female) who set them free.
The one who set them free (male or female) will be entitled to inherit the entire wealth only when there is no other real heir present.