Passing gas nullifies Wudu' according to Nas (Islamic texts from the Qur’an or the Sunnah) and Ijma` (consensus of scholars). The Prophet (peace be upon him) said about a person who feels something like this in his Salah (Prayer):
He should not leave (prayer) until he hears a sound or smells an odor (of passing wind).
Al-Bukhari) The Hadith means that a person should not leave Salah until he is sure that he really passed gas, which indicates that it nullifies Wudu'. The Prophet (peace be upon him) said:
When any of you passes gas during Salah, you should leave Salah, perform Wudu', and repeat the Salah.
Ahmad and the Four Compilers of Hadith [Imams Abu Dawud, Al-Tirmidhy, Al-Nasa'y and Ibn Majah] and
Ibn Hibban ranked it as Sahih [authentic])May Allah grant us success. May peace and blessings be upon our Prophet Muhammad, his family, and Companions.