(59) باب إِذَا هَمَّ الْعَبْدُ بِحَسَنَةٍ كُتِبَتْ وَإِذَا هَمَّ بِسَيِّئَةٍ لَمْ تُكْتَبْ
This hadith has been narrated with another chain of transmitters with the addition of these words:
Allah would even wipe out (the evil committed by a man) and Allah does not put to destruction anyone except he who is doomed to destruction. (JA)
Reference (JA): Sahih Muslim 131 b (JA)
In-book reference (JA): Book 1, Hadith 246 (JA)
USC-MSA web (English) reference(deprecated numbering scheme): Book 1, Hadith 238 (JA)