Abu Huraira reported: The Prophet, peace and blessings be upon him, said, “Allah had once forgiven a prostitute. She passed by a dog panting near a well. Seeing that thirst had nearly killed him, she took off her shoe, tied it to her scarf, and drew up some water. Allah forgave her for that.”
نْ أَبِي هُرَيْرَةَ رَضِيَ اللَّهُ عَنْهُ عَنْ رَسُولِ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ قَالَ غُفِرَ لِامْرَأَةٍ مُومِسَةٍ مَرَّتْ بِكَلْبٍ عَلَى رَأْسِ رَكِيٍّ يَلْهَثُ قَالَ كَادَ يَقْتُلُهُ الْعَطَشُ فَنَزَعَتْ خُفَّهَا فَأَوْثَقَتْهُ بِخِمَارِهَا فَنَزَعَتْ لَهُ مِنْ الْمَاءِ فَغُفِرَ لَهَا بِذَلِكَ
Source: Sahih Bukhari 3143, Sahih Muslim 2245