Narrated Abdullah ibn Abbas:
A man died leaving no heir but a slave whom he had emancipated. The Messenger of Allah (ﷺ) asked: Has he any heir? They replied: No, except a slave whom he had emancipated. The Messenger of Allah (ﷺ) assigned his estate to him (the emancipated slave).