Sahih al-Bukhari, Book 4, Hadith 3 (Bukhari 137)

Narrated `Abbad bin Tamim:

My uncle asked Allah's Messenger (ﷺ) about a person who imagined to have passed wind during the prayer. Allah' Apostle replied: "He should not leave his prayers unless he hears sound or smells something."