Maliks Muwatta Book 20, Hadith Number 123.

Section : Taking Leave of the House.

Yahya related to me from Malik from Hisham ibn Urwa that his father said, “Allah has completed the hajj of anyone who does the tawaf al-ifada. It is fitting that tawaf of the House be the last of his contract, as long as nothing prevents him, and if something prevents him, or an obstacle arises, then Allah has completed his hajj.”

Malik said, “I do not think that a man who does not know that the last of his contract is tawaf of the House until he has left owes anything, unless he is nearby and can return, do tawaf, and then leave having done the tawaf al-ifada.”