Imam al-Shafi'i (may Allah have mercy on him) said: "She (the umm walad) remains owned (a slave woman) as she is, except that it is not permissible for her master to sell her, nor to remove her from his ownership by any means other than manumission; and when he (the master) dies, she becomes free out of the capital (of the estate)."
He (Imam al-Shafi'i, may Allah have mercy on him) said: "This (position) is in following Sayyiduna Umar bin al-Khattab (may Allah be pleased with him)."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب المكاتب / Q21763