Found this while doing a search:
LINDA J. HARRIS
Food Safety/Microbiology Specialist, Department of Food Science and Technology
University of California, Davis
STORING GARLIC IN OIL
Extreme care must be taken when preparing flavored
oils with garlic or when storing garlic in
oil. Peeled garlic cloves may be submerged in oil
and stored in the freezer for several months. Do
not store garlic in oil at room temperature.
Garlic-in-oil mixtures stored at room temperature
provide perfect conditions for producing botulism
toxin (low acidity, no free oxygen in the oil,
and warm temperatures). The same hazard exists
for roasted garlic stored in oil. At least three outbreaks
of botulism associated with garlic-in-oil
mixtures have been reported in North America.
By law, commercially prepared garlic in oil
has been prepared using strict guidelines and
must contain citric or phosphoric acid to increase
the acidity. Unfortunately, there is no easy or
reliable method to acidify garlic in the home.
Acidifying garlic in vinegar is a lengthy and
highly variable process; a whole clove of garlic
covered with vinegar can take from 3 days to
more than 1 week to sufficiently acidify. As an
alternative, properly prepared dried garlic cloves
may be safely added to flavor oils.
From another source:
Storing Garlic in Oil - Warning! - Not Safe.
It's important to keep food safety in mind when storing garlic in oil. Low-acid foods like garlic can be a source of Clostridium botulinum bacteria which are found in soil, water, and air. Oil's oxygen-free environment is perfect for growth of this anaerobic bacteria. Garlic in oil, therefore, must be stored correctly to prevent botulism food poisoning.
Commercial garlic-in-oil mixtures are acidified to prevent bacterial growth. These products can be stored safely at room temperature. Unfortunately, acidification of garlic in homemade oil mixtures can't be recommended because no research exists to support proper procedures. Different people recommend different methods and time to acidify and it is hard to know who is right. Instead, it's best to store these hazardous oils in the refrigerator, but for a limited time only. This conflicts with the desire for long term storage.
When raw garlic is stored in oil, Clostridium botulinum bacteria can grow. These mixtures must be refrigerated to slow bacterial growth. After 3 weeks of refrigeration, the increased number of bacteria will become a food safety hazard. Therefore, these mixtures should not be refrigerated longer than 3 weeks.
When garlic is immediately removed after flavoring oil, the bacteria will not have a "food source" for growth. The flavored oil can be stored safely at room temperature.
When vegetables or herbs are dried, water will not be available for bacterial growth. Therefore, DRIED vegetables or dried herbs (including garlic) in oil can be stored safely at room temperature. Note. Tomatoes are high in acid. Therefore, plain dried tomatoes in oil can be safely stored at room temperature.
Storage Recommendations: (According to Oregon State University Extension Service).
Raw or cooked garlic and/or herbs in oil:
These mixtures MUST be refrigerated. Do not store them longer than 3 weeks in the refrigerator. (Note. Raw garlic MAY be safely stored in vinegar at room temperature.)
Dried garlic and/or herbs in oil: If oil is seasoned with dried garlic and/or dried herbs, the mixture may be safely stored at room temperature. (Refrigeration may delay rancidity, however.)