Hadithcore
Mishkat al-Masabih, 1007

‘A’isha reported the Prophet (ﷺ) as saying, “If any of you breaks wind during prayer he should hold his nose and withdraw.” Abu Dawud transmitted it.

وَعَنْ عَائِشَةَ رَضِيَ اللَّهُ عَنْهَا أَنَّهَا قَالَتْ: قَالَ النَّبِيُّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: «إِذَا أحدث أدكم فِي صَلَاتِهِ فَلْيَأْخُذْ بِأَنْفِهِ ثُمَّ لِيَنْصَرِفْ» . رَوَاهُ أَبُو دَاوُد

References1 variant
In-Book Reference
Book 4, Hadith 427