This loop has many early exits, and all of them need to free this info object that gets allocated at the beginning.