Muwatta Imam Malik Book of Hajj, Hadith 238
Yahya related to me from Malik from Abdullah ibn Abi Bakr from his father that Abu Salama ibn Abd ar-Rahman told him that Umm Sulaym bint Milhan asked the Messenger of Allah ﷺ for advice one time when she had begun menstruating, or had given birth to a child after she had done tawaf al-ifada on the Day of Sacrifice. The Messenger of Allah ﷺ gave her permission to leave.
Malik said, "A woman menstruating at Mina stays until she has done tawaf of the House. There is no escape from that for her. If she has already done the tawaf al-ifada and she starts to menstruate afterwards, she may leave for her country, since permission for the menstruating women to leave has been transmitted to us from the Messenger of Allah, may Allah bless him and grant him peace."
He added, "If a woman starts her period at Mina before she does the tawaf al-ifada, and the period lasts longer than usual, she has to stay longer than the time that bleeding would usually detain women."
وَحَدَّثَنِي عَنْ مَالِكٍ، عَنْ عَبْدِ اللَّهِ بْنِ أَبِي بَكْرٍ، عَنْ أَبِيهِ، أَنَّ أَبَا سَلَمَةَ بْنَ عَبْدِ الرَّحْمَنِ، أَخْبَرَهُ أَنَّ أُمَّ سُلَيْمٍ بِنْتَ مِلْحَانَ اسْتَفْتَتْ رَسُولَ اللَّهِ ﷺ وَحَاضَتْ - أَوْ وَلَدَتْ - بَعْدَ مَا أَفَاضَتْ يَوْمَ النَّحْرِ فَأَذِنَ لَهَا رَسُولُ اللَّهِ ﷺ فَخَرَجَتْ .