a man died during the time of the Messenger of Allah ﷺ ,and he did not leave any heirs except for a slave that he had freed. So the Prophet gave him his inheritance (Using translation from Tirmidhī 2106)
عَنِ ابْنِ عَبَّاسٍ رَجُلٌ مَاتَ عَلَى عَهْدِ رَسُولِ اللهِ ﷺ وَلَمْ يَتْرُكْ وَارِثًا إِلا عَبْدًا هُوَ أَعْتَقَهُ فَأَعْطَاهُ مِيرَاثَهُ