Sayyiduna Ibn Abbas (may Allah be pleased with them both) narrates that a man died and did not leave any heir, so the Prophet (peace and blessings be upon him) said: "Search (for one)." The people did not find any heir of his, so the Prophet (peace and blessings be upon him) gave his inheritance to his freed slave whom the deceased had set free, because wala' (the right of clientage) belongs to the one who set free.
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 12157