The Messenger of Allah ﷺ said, "If one of you breaks wind silently during the prayer, he should leave, perform ablution, and repeat his prayer."
حدثنا عثمان بن أبي شيبة حدثنا جرير بن عبد الحميد عن عاصم الأحول عن عيسى بن حطان عن مسلم بن سلام
قال رسول الله ﷺ إذا فسا أحدكم في الصلاة فلينصرف فليتوضأ وليعد صلاته
[Hasan] Previously mentioned: 205. Bayhaqi narrated it: 2/255, from the hadith of Abu Dawud, in a similar manner.