A man from Banu Sulaym narrates from Sinin bin Abi Jameelah that during the time of Umar bin Khattab (may Allah be pleased with him), he found a child lying on the road, so he brought the child to Umar bin Khattab (may Allah be pleased with him). He (may Allah be pleased with him) said: "What made you pick up this soul?" He replied: "It was being lost, so I picked it up." My master said to him: "O Commander of the Faithful! He is a righteous man." Umar (may Allah be pleased with him) said: "Is that so?" He replied: "Yes." Then Umar (may Allah be pleased with him) said: "You may go, this child is free, his wala' (allegiance) is for you, and his expenses are our responsibility."
Hadith Referenceمسند الإمام الشافعي / كتاب العتق والولاء والمدبر والمكاتب وحسن الملكة / 1082
Hadith Takhrijاسناده ،صحیح اخرجه البيهقي : 201/6 ، 202 - وعبد الرزاق (16182) وابن أبي شيبة (31569)۔