/* If there are options or categories to inherit from, process them now */
if (c) {
if (!(cur = strchr(c, ')'))) {
+ ast_category_destroy(newcat);
ast_log(LOG_WARNING, "parse error: no closing ')', line %d of %s\n", lineno, configfile);
return -1;
}
base = category_get(cfg, cur, 1);
if (!base) {
+ if (newcat) {
+ ast_category_destroy(newcat);
+ }
ast_log(LOG_WARNING, "Inheritance requested, but category '%s' does not exist, line %d of %s\n", cur, lineno, configfile);
return -1;
}