Chilli oil with fresh pepper & garlic
One has to be particularly careful when infusing oils since additives are often submerged in the oil without oxygen. This increases the risk of anaerobic bacteria development (such as dreaded botulism). I've heard horror stories with garlic particularly.
I would recommend infusing dry chile into the oil, steeping it for a limited time, straining it, then keeping it airtight. Depending on the oil, you may not even need to chill it.
I'm about to make a Thai chili oil with dried chilies, fresh garlic and ginger. The chili flakes are charred in the oil, garlic slices and ginger slices added and it continues to cook until they turn a golden brown. I will keep it in my fridge. Is that the type you are making or are you infusing in gently warmed oil?