Narrated `Abdullah bin `Umar
`Umar bin Al-Khattab gave a horse in charity in Allah's Cause and later he saw it being sold in the market and intended to purchase it. Then he went to the Prophet (ﷺ) and asked his permission. The Prophet said, "Do not take back what you have given in charity." For this reason, Ibn `Umar never purchased the things which he had given in charity, and in case he had purchased something (unknowingly) he would give it in charity again.
Narrated `Umar
Once I gave a horse in Allah's Cause (in charity) but that person did not take care of it. I intended to buy it, as I thought he would sell it at a low price. So, I asked the Prophet (p.b.u.h) about it. He said, "Neither buy, nor take back your alms which you have given, even if the seller were willing to sell it for one Dirham, for he who takes back his alms is like the one who swallows his own vomit."