أَخْبَرَنَا عَمْرُو بْنُ عَلِيٍّ، قَالَ حَدَّثَنَا يَحْيَى، قَالَ حَدَّثَنَا ابْنُ أَبِي ذِئْبٍ، قَالَ حَدَّثَنَا الأَسْوَدُ بْنُ الْعَلاَءِ بْنِ جَارِيَةَ الثَّقَفِيُّ، عَنْ أَبِي سَلَمَةَ، - هُوَ ابْنُ عَبْدِ الرَّحْمَنِ - عَنْ أَبِي هُرَيْرَةَ، عَنِ النَّبِيِّ صلى الله عليه وسلم قَالَ ‏"‏ حِينَ يَخْرُجُ الرَّجُلُ مِنْ بَيْتِهِ إِلَى مَسْجِدِهِ فَرِجْلٌ تُكْتَبُ حَسَنَةً وَرِجْلٌ تَمْحُو سَيِّئَةً ‏"‏ ‏.‏

It was narrated from Abu Hurairah that the Prophet (PBUH) said: "When a man goes out of his house to his Masjid, one foot records a good deed and the other erases a bad deed." Translation Not Available

Book Ref: Sunan An Nisai Book 8 Hadith 705
Web Ref:  Sunan An Nisai Vol 1 Book 8 Hadith 706