Sayyiduna Ibn Umar (may Allah be pleased with them both) said: I heard the Prophet (peace and blessings be upon him) say: "Every pregnant slave woman is unlawful to her owner until she gives birth to what is in her womb, and every donkey that is used for work, its meat is unlawful."
"And garlic is unlawful." Then the Prophet (peace and blessings be upon him) made garlic lawful, and ordered whoever ate it not to go to the mosque until its smell had gone, because it is offensive; so whoever eats it should not come near the mosque.
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 13555