Sayyiduna Abdullah bin Umar (may Allah be pleased with them both) said that Sayyiduna Umar (may Allah be pleased with him) gave a horse in charity in the way of Allah. Then he saw it being sold, and he intended to buy it, so he came to the Messenger of Allah (peace and blessings be upon him) and consulted him, and he (peace and blessings be upon him) said: "Do not go back on your charity." For this reason, Ibn Umar (may Allah be pleased with them both) would not buy anything that he had given in charity or by which he had sought righteousness; (if he did,) he would give it in charity.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الزكاة / 7634