Sunan Ibn Majah
2741
Daif+3

It was narrated that Ibn ‘Abbas said:“A man died at the time of the Messenger of Allah (ﷺ), and he left no heir except for a slave whom he had set free. The Messenger of Allah (ﷺ) gave the legacy to him.”

DaifAl-Albani
DaifMuhammad Fouad Abd al-Baqi