It is narrated from Sayyiduna Ibn Abbas (may Allah be pleased with them both) that a man died in the time of the Messenger of Allah (peace and blessings be upon him). The Prophet (peace and blessings be upon him) said: "See whether he has any heir." They said: No, except a slave of his whom he had set free. The Messenger of Allah (peace and blessings be upon him) said: "Give him his inheritance."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الفرائض / 12394