Hazrat Sha'bi (may Allah have mercy on him) says that if a slave woman is married to a free man or a slave, and she is divorced twice while she is pregnant, then it is obligatory upon the husband to provide maintenance and residence for her until the child is born.
Hadith Referenceسنن سعید بن منصور / كتاب الطلاق / 2572
Hadith Takhrij«أخرجه سعيد بن منصور فى «سننه» ترقيم الدرالسلفية برقم:، 1395، وابن أبى شيبة فى «مصنفه» برقم: 19013، 19556»