Sahih Bukhari | Volume 7 | Hadith Number 362

Narrated by 'Abdul 'Aziz
It was said to Anas "What did you hear the Prophet saying about garlic?" Anas replied, "Whoever has eaten (garlic) should not approach our mosque."