Maliks Muwatta Book 20, Hadith Number 166.
Yahya related to me from Malik that he had heard Rabia ibn Abi Abd ar-Rahman saying the same about that as what Ikrama related from Ibn Abbas.
Malik said, “That is what I like most out of what I have heard about the matter.”
Malik was asked about a man who forgot the tawaf al-ifada until he had left Makka and returned to his community and he said, “I think that he should go back and do the tawaf al-ifada, as long as he has not had sexual relations with women. If, however, he has had sexual relations with women, then he should not only return and do the tawaf al-ifada, but he should also do an umra and sacrifice an animal. He should not buy the animal in Makka and sacrifice it there, but if he has not brought one with him from wherever it was he set out to do umra, he should buy one in Makka and then take it outside the limits of the Haram and drive it from there to Makka and sacrifice it there.”