Abdullah bin Abbas reported,

She must observe the waiting period of whichever of the two terms ends later.Abu Salama said, "Rather, she becomes lawful for marriage as soon as she gives birth."Abu Hurairah said, "I side with my nephew," meaning Abu Salama.So they sent word to Umm Salama, the wife of the Prophet ﷺ, who replied, "Sabia al-Aslamia gave birth shortly after her husband's death, and she sought a ruling from the Messenger of Allah ﷺ, who instructed her that she could marry."

Tirmidhi 1194

Sahih

حدثنا قتيبة حدثنا الليث عن يحيى بن سعيد عن سليمان بن يسار أن أبا هريرة وابن عباس وأبا سلمة بن عبد الرحمن تذاكروا المتوفى عنها زوجها الحامل تضع عند وفاة زوجها

فقال ابن عباس

تعتد آخر الأجلين وقال أبو سلمة بل تحل حين تضع وقال أبو هريرة أنا مع ابن أخي يعني أبا سلمة فأرسلوا إلى أم سلمة زوج النبي ﷺ فقالت قد وضعت سبيعة الأسلمية بعد وفاة زوجها بيسير فاستفتت رسول الله ﷺ فأمرها أن تتزوج

الترمذي 1194صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami Tirmidhi
Book
Divorce and lian
Chapter
Pregnant woman whose husband dies and she gives birth
Numbering
Darussalam 1194
Tirmidhi 1194