Maliks Muwatta Book 17, Hadith Number 51.

Section : Selling Sadaqa and Taking it Back.

Yahya related to me from Malik from Nafi from Abdullah ibn Umar that Umaribnal-Khattab gave a horse to carry some one in the way of Allah, and then he wished to buy it back. So he asked the Messenger of Allah, may Allah bless him and grant him peace, about it, and he said, “Do not buy or take back your sadaqa.”

Yahya said that Malik was asked about whether a man who gave some sadaqa, and then found it being offered back to him for sale by some one other than the man to whom he had given it, could buy it or not, and he said, “I prefer that he leaves it.”