It is narrated from Awsajah (may Allah have mercy on him) that a man set another man free; then the one who had set him free died and had no heir, so the Messenger of Allah (peace and blessings be upon him) gave his inheritance to the one who had been freed.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الفرائض / 12397