(17) بَابُ إِذَا وَقَعَ الذُّبَابُ فِي شَرَابِ أَحَدِكُمْ فَلْيَغْمِسْهُ، فَإِنَّ فِي إِحْدَى جَنَاحَيْهِ دَاءً وَفِي الأُخْرَى شِفَاءً
Narrated Abu Huraira:
Allah's Messenger (ﷺ) said, "A prostitute was forgiven by Allah, because, passing by a panting dog near a well and seeing that the dog was about to die of thirst, she took off her shoe, and tying it with her head-cover she drew out some water for it. So, Allah forgave her because of that."
Reference: Sahih al-Bukhari 3321
In-book reference: Book 59, Hadith 127
USC-MSA web (English) reference(deprecated numbering scheme): Vol. 4, Book 54, Hadith 538