From Sahih Muslim (Hadith 4173):
Ibn Abbas (Allah be pleased with them) reported:I heard Allah's Messenger (ﷺ) say: The similitude of one who gives a charity and then gets it back is like that of a dog which vomits and then eats its vomit
Reference: Muslim 4173