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 (ﷺ)."
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."
Arabic : Book 20, Hadith 936