كتاب الهبات
24  
The Book of Gifts
(1)
Chapter: It Is Disliked For A Man To Buy What He Gave In Charity From The One To Whom He Gave It
(1)
باب كَرَاهَةِ شِرَاءِ الإِنْسَانِ مَا تَصَدَّقَ بِهِ مِمَّنْ تَصَدَّقَ عَلَيْهِ ‏‏
Sahih Muslim 1620 c

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.
حَدَّثَنِي أُمَيَّةُ بْنُ بِسْطَامَ، حَدَّثَنَا يَزِيدُ، - يَعْنِي ابْنَ زُرَيْعٍ - حَدَّثَنَا رَوْحٌ، - وَهُوَ ابْنُ الْقَاسِمِ - عَنْ زَيْدِ بْنِ أَسْلَمَ، عَنْ أَبِيهِ، عَنْ عُمَرَ، أَنَّهُ حَمَلَ عَلَى فَرَسٍ فِي سَبِيلِ اللَّهِ فَوَجَدَهُ عِنْدَ صَاحِبِهِ وَقَدْ أَضَاعَهُ وَكَانَ قَلِيلَ الْمَالِ فَأَرَادَ أَنْ يَشْتَرِيَهُ فَأَتَى رَسُولَ اللَّهِ صلى الله عليه وسلم فَذَكَرَ ذَلِكَ لَهُ فَقَالَ ‏ "‏ لاَ تَشْتَرِهِ وَإِنْ أُعْطِيتَهُ بِدِرْهَمٍ فَإِنَّ مَثَلَ الْعَائِدِ فِي صَدَقَتِهِ كَمَثَلِ الْكَلْبِ يَعُودُ فِي قَيْئِهِ ‏"‏ ‏.‏
Reference : Sahih Muslim 1620c
In-book reference : Book 24, Hadith 3
USC-MSA web (English) reference : Book 12, Hadith 3950
  (deprecated numbering scheme)