Ubaydullah bin Umar (may Allah have mercy on him) narrates from Nafi' (may Allah have mercy on him) that two men met Ibn Umar (may Allah be pleased with them both) on one of the roads of Madinah. They said: "We have left Ibn al-Zubayr (may Allah be pleased with him) selling ummahat al-awlad." He said to them: "Do you know Abu Hafs, Sayyiduna Umar (may Allah be pleased with him)?" They said: "Yes." He said: "He ruled that it is not permissible to sell ummahat al-awlad, give them as gifts or make them part of an inheritance; her owner may enjoy her during his lifetime, and after his death she will be free."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب عتق أمهات الأولاد / 21795