Sunan Abi Dawud, Book 1, Hadith 205 (Abu Dawud 205)

Narrated Ali ibn Talq:

The Messenger of Allah (ﷺ) said: When any of you breaks wind during the prayer, he should turn away and perform ablution and repeat the prayer.