“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.”
مَاتَ رَجُلٌ عَلَى عَهْدِ رَسُولِ اللَّهِ ﷺ وَلَمْ يَدَعْ لَهُ وَارِثًا إِلاَّ عَبْدًا هُوَ أَعْتَقَهُ فَدَفَعَ النَّبِيُّ ﷺ مِيرَاثَهُ إِلَيْهِ