Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
bukhari:1489Yaḥyá b. Bukayr > al-Layth > ʿUqayl > Ibn Shihāb > Sālim > ʿAbdullāh

ʿ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.  

البخاري:١٤٨٩حَدَّثَنَا يَحْيَى بْنُ بُكَيْرٍ حَدَّثَنَا اللَّيْثُ عَنْ عُقَيْلٍ عَنِ ابْنِ شِهَابٍ عَنْ سَالِمٍ أَنَّ عَبْدَ اللَّهِ بْنَ عُمَرَ ؓ كَانَ يُحَدِّثُ أَنَّ عُمَرَ بْنَ الْخَطَّابِ تَصَدَّقَ بِفَرَسٍ فِي سَبِيلِ اللَّهِ فَوَجَدَهُ يُبَاعُ فَأَرَادَ

أَنْ يَشْتَرِيَهُ ثُمَّ أَتَى النَّبِيَّ ﷺ فَاسْتَأْمَرَهُ فَقَالَ لاَ تَعُدْ فِي صَدَقَتِكَ فَبِذَلِكَ كَانَ ابْنُ عُمَرَ ؓ لاَ يَتْرُكُ أَنْ يَبْتَاعَ شَيْئًا تَصَدَّقَ بِهِ إِلاَّ جَعَلَهُ صَدَقَةً  


See similar narrations below:

Collected by Nasāʾī's Kubrá
nasai-kubra:2410Muḥammad b. ʿAbdullāh b. al-Mubārak > Ḥujayn b. al-Muthanná > al-Layth > ʿUqayl > Ibn Shihāb > Sālim b. ʿAbdullāh

[Machine] He buys it, then he goes to the Messenger of Allah ﷺ and consults him in that. The Messenger of Allah ﷺ tells him, "Do not count it as a charity."  

الكبرى للنسائي:٢٤١٠أَخْبَرَنَا مُحَمَّدُ بْنُ عَبْدِ اللهِ بْنِ الْمُبَارَكِ قَالَ حَدَّثَنَا حُجَيْنُ بْنُ الْمُثَنَّى قَالَ حَدَّثَنَا اللَّيْثُ عَنْ عُقَيْلٍ عَنِ ابْنِ شِهَابٍ عَنْ سَالِمِ بْنِ عَبْدِ اللهِ أَنَّ عَبْدَ اللهِ بْنَ عُمَرَ كَانَ يُحَدِّثُ أَنَّ عُمَرَ بْنَ الْخَطَّابِ تَصَدَّقَ بِفَرَسٍ فِي سَبِيلِ اللهِ فَوَجَدَهُ يُبَاعُ بَعْدَ ذَلِكَ فَأَرَادَ

أَنْ يَشْتَرِيَهُ ثُمَّ أَتَى رَسُولَ اللهِ ﷺ فَاسْتَأْمَرَهُ فِي ذَلِكَ فَقَالَ لَهُ رَسُولُ اللهِ ﷺ «لَا تَعُدْ فِي صَدَقَتِكَ»