Maliks Muwatta Book 20, Hadith Number 249.

Section : What to Do for Forgetfulness in the Rituals.

Yahya related to me from Malik from Ayyub ibn Abi Tamima as-Sakhtayani from Said ibn Jubayr that Abdullah ibn Abbas said, “If someone forgets anything of the rituals or omits them intentionally, he must slaughter an animal.” Ayyub added “I do not know if he said ‘Omits’ or ‘forgets’.”

Malik said, “If it is a hady that has to be slaughtered it may only be done in Makka, but if it is a sacrifice, it may be slaughtered wherever the one who owes the sacrifice prefers.”