Ibrahim Nakha'i (may Allah have mercy on him) said: A woman received news of her husband's death, so she married another man. Then she learned that her first husband was alive, and he gave her three divorces. He said: "The woman should separate from the second husband and observe three menstrual cycles, then she may marry whomever she wishes. And if she is pregnant, the delivery of the child is her waiting period, then she should observe two more menstrual cycles."
Hadith Referenceسنن سعید بن منصور / كتاب النكاح / 1884