Hadith 500310
Chapter 1: The Times of 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."
Reference Muwatta Malik 500310
USC-MSA web (English) reference : Book 1, Hadith 30