Sahih Muslim 1620 c
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
لاَ تَشْتَرِهِ وَإِنْ أُعْطِيتَهُ بِدِرْهَمٍ فَإِنَّ مَثَلَ الْعَائِدِ فِي صَدَقَتِهِ كَمَثَلِ الْكَلْبِ يَعُودُ فِي قَيْئِهِ "
Zaid b. Aslam reported on the authority of his father that 'Umar (Allah be pleased with him) donated a horse in the path of Allah. He found that it had languished in the hand of its possessor, and he was a man of meagre resources He (Hadrat 'Umar) intended to buy it. He came to Allah's Messenger (ﷺ) and made a mention of that to him, whereupon he said:
Don't buy that even if you get it for a dirham for he who gets back the charity is like a dog which swallows its vomit.
Full reference and source
Sahih Muslim 1620 c In-book : Book 24, Hadith 3 USC-MSA web (English) : Book 12, Hadith 3950 (deprecated)
View source on Sunnah.com (opens in a new tab)