Garlic confit and infused olive oil needs to be refrigerated, due to a risk of developing botulism and other bacterias. It is best to used within 4 days, per food safety guidelines. Please be aware that storing homemade garlic confit and garlic oil for longer – or improperly – poses an inherent food safety risk.  That being said, I have stored it for longer than 4 days with no problem. The risk is up to you.