Do not call regfree() on an empty regex that is not successfully created by regcomp (also removed an unused member "has_regex" from all_iter)