If the basil in olive oil were at room temperature, yes, that would be dangerous. But freezing basil in oil is fine.