Sahih al-Bukhari 851
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
ذَكَرْتُ شَيْئًا مِنْ تِبْرٍ عِنْدَنَا فَكَرِهْتُ أَنْ يَحْبِسَنِي، فَأَمَرْتُ بِقِسْمَتِهِ "
Narrated `Uqba:
I offered the `Asr prayer behind the Prophet (ﷺ) at Medina. When he had finished the prayer with Taslim, he got up hurriedly and went out by crossing the rows of the people to one of the dwellings of his wives. The people got scared at his speed . The Prophet (ﷺ) came back and found the people surprised at his haste and said to them, "I remembered a piece of gold Lying in my house and I did not like it to divert my attention from Allah's worship, so I have ordered it to be distributed (in charity).
Full reference and source
Sahih al-Bukhari 851 In-book : Book 10, Hadith 242 USC-MSA web (English) : Vol. 1, Book 12, Hadith 810 (deprecated)
View source on Sunnah.com (opens in a new tab)