Jami` at-Tirmidhi, Book 7, Hadith 52 (Tirmidhi 668)

Ibn Umar narrated that :

Umar gave a horse to be used in the cause of Allah. Then he saw it being sold, so he wanted to buy it, but the Prophet said: "Do not take back what you have given in charity."