Maliks Muwatta Book 1, Hadith Number 30.

Section : The Prohibition against Entering the Mosque Smelling of Garlic and the Prohibition against covering the Mouth in Prayer.

Yahya related to me from Malik from Ibn Shihab from Said ibn al-Musayyab that the Messenger of Allah, may Allah bless him and grant him peace, said, “Anyone who eats this plant should not come near our mosques. The smell of the garlic will offend us.”