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."
Jami` at-Tirmidhi Book 7, Hadith 52