´It was narrated from Abu Hurairah that the Prophet (ﷺ) 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."
Hadith Referenceسنن نسائي / كتاب المساجد / 706
Hadith Gradingالألبانی:صحيح | زبیر علی زئی:إسناده صحيح
706. Commentary: Another possible meaning is that one foot records a good deed and the other foot erases a sin. The attribution to the foot will be metaphorical. The outcome of both meanings is the same; it is just that the second meaning contains greater eloquence. And Allah knows best.
Source: Sunan Nasa'i: Translation and Benefits by Shaykh Hafiz Muhammad Amin Hafizullah, Page: 706