Muwatta Malik, Book 17, Hadith 51 (USC-MSA)

Yahya related to me from Malik from Nafi from Abdullah ibn Umar that Umar ibn al-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."

وَحَدَّثَنِي عَنْ مَالِكٍ، عَنْ نَافِعٍ، عَنْ عَبْدِ اللَّهِ بْنِ عُمَرَ، أَنَّ عُمَرَ بْنَ الْخَطَّابِ، حَمَلَ عَلَى فَرَسٍ فِي سَبِيلِ اللَّهِ فَأَرَادَ أَنْ يَبْتَاعَهُ فَسَأَلَ عَنْ ذَلِكَ رَسُولَ اللَّهِ صلى الله عليه وسلم فَقَالَ ‏ "‏ لاَ تَبْتَعْهُ وَلاَ تَعُدْ فِي صَدَقَتِكَ ‏" ‏ ‏.‏

sunnah.com

also referenced under: Book 17, Hadith 627 (In-Book)

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."

sunnah.com