Muwatta Malik, Book 20, Hadith 159 (USC-MSA)

Yahya related to me from Malik that he had heard the people of knowledge say, "Someone who dedicates a sacrificial animal for compensation or as part of the hajj should not eat from it."

sunnah.com