What may not be done during Prayer and what is permitted - Section 2 Mishkat al-Masabih 1007
Arabic hadith text
وَعَنْ عَائِشَةَ رَضِيَ اللَّهُ عَنْهَا أَنَّهَا قَالَتْ: قَالَ النَّبِيُّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: «إِذَا أحدث أدكم فِي صَلَاتِهِ فَلْيَأْخُذْ بِأَنْفِهِ ثُمَّ لِيَنْصَرِفْ» . رَوَاهُ أَبُو دَاوُد
Translation
‘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.