Anas bin Malik narrated that :
the Messenger of Allah said: "To spit in the Masjid is a sin, and burying it is its atonement."