I do something very similar, and put it in the freezer. I put the garlic in oil on plastic wrap, and work it into a roll of about 3/4-inch. Wrap it up, put the roll in a zip-top bag and into the freezer. It will freeze solid, so rolling it out makes it easy to just slice off however much you need. I also blanch my garlic before I mince it - this helps soften the bite that raw garlic can have.
Storing garlic in oil can cause botulism. See article at Health Canada website: http://www.hc-sc.gc.ca/iyh-vsv/food-aliment/garlic-ail_e.html
Aww the two reviews for this were so bad I have to throw in my two cents here. I've stored garlic this way for quite a few years...just remember, kids, to boil your jars and lids to prevent nasties. The most basic of basic canning and the leftover oil is fantastic for salad dressing...but then you didn't hear it from me, k? I've kept a mason jar in my fridge for quite some time, the oil will solidify...time to use a little scoop of it for sauteeing in place of butter...num. The naysayers below do have some good points but a little precaution goes a long way with this simple, effective practice of storing garlic.
Terrible way to store garlic, it will rot. Have you ever stored garlic like this for 3 months? If you have i am surprised you are not sick. Fresh vegetable matter should never be left in oil for long periods of time as it will start to decompose.