Sayyiduna Ibn Abbas (may Allah be pleased with them both) said that Sayyiduna Umar bin al-Khattab (may Allah be pleased with him) said: When an umm walad gives birth to a child of her master, she becomes free, even if the child is stillborn.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب المكاتب / 21786