Al-Hakam bin Aban (may Allah have mercy on him) said: Ikrimah (may Allah have mercy on him) was asked about the ummahat al-awlad, and he said: "They are free." They said: "On what basis do you say this?" He said: "On the basis of the Qur'an." They said: "What is in the Qur'an?" He said: "O you who believe, obey Allah and obey the Messenger and those in authority among you." [Surah al-Nisa: 59] Sayyiduna Umar (may Allah be pleased with him) was one of those in authority. He said: "She becomes free, even if the child is stillborn."
(b) Sayyiduna Ibn Abbas (may Allah be pleased with them both) narrates from the Prophet (peace and blessings be upon him): "The umm walad is free, even if the child is stillborn."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب المكاتب / 21787