Sunan Abi Dawud, Book 2, Hadith 616 (Abu Dawud 1006)

‘Ali b. Talq reported the Messenger of Allah (ﷺ) as saying:

When any of you breaks wind during prayer, he must withdraw, perform ablution, and repeat the prayer.