كتاب الهبات
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 1621 c

Salim reported from Ibn Umar (Allah be pleased with them) that 'Umar donated a horse in the path of Allah and then found it being sold, and he decided to buy that. He asked Allah's Apostle (ﷺ) about it, whereupon Allah's Messenger (ﷺ) said:

Umar, do not get back what you gave as charity.
حَدَّثَنَا ابْنُ أَبِي عُمَرَ، وَعَبْدُ بْنُ حُمَيْدٍ، - وَاللَّفْظُ لِعَبْدٍ - قَالَ أَخْبَرَنَا عَبْدُ الرَّزَّاقِ، أَخْبَرَنَا مَعْمَرٌ، عَنِ الزُّهْرِيِّ، عَنْ سَالِمٍ، عَنِ ابْنِ عُمَرَ، أَنَّ عُمَرَ، حَمَلَ عَلَى فَرَسٍ فِي سَبِيلِ اللَّهِ ثُمَّ رَآهَا تُبَاعُ فَأَرَادَ أَنْ يَشْتَرِيَهَا فَسَأَلَ النَّبِيَّ صلى الله عليه وسلم فَقَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏ "‏ لاَ تَعُدْ فِي صَدَقَتِكَ يَا عُمَرُ ‏"‏ ‏.‏
Reference : Sahih Muslim 1621c
In-book reference : Book 24, Hadith 7
USC-MSA web (English) reference : Book 12, Hadith 3954
  (deprecated numbering scheme)