- Free view config elements.

git-svn-id: file:///svn/unbound/trunk@3881 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Ralph Dolmans 2016-10-12 10:09:42 +00:00
parent de7bc9f96e
commit 840142397d
3 changed files with 13 additions and 0 deletions

View file

@ -1,3 +1,6 @@
12 October 2016: Ralph
- Free view config elements.
11 October 2016: Ralph 11 October 2016: Ralph
- Added qname-minimisation-strict config option. - Added qname-minimisation-strict config option.
- iana portlist update. - iana portlist update.

View file

@ -166,6 +166,12 @@ views_apply_cfg(struct views* vs, struct config_file* cfg)
lock_rw_unlock(&v->lock); lock_rw_unlock(&v->lock);
return 0; return 0;
} }
/* local_zones, local_zones_nodefault and local_data
* are free'd from config_view by local_zones_apply_cfg.
* Set pointers to NULL. */
cv->local_zones = NULL;
cv->local_data = NULL;
cv->local_zones_nodefault = NULL;
} }
lock_rw_unlock(&v->lock); lock_rw_unlock(&v->lock);
} }

View file

@ -170,6 +170,7 @@ config_create(void)
cfg->out_ifs = NULL; cfg->out_ifs = NULL;
cfg->stubs = NULL; cfg->stubs = NULL;
cfg->forwards = NULL; cfg->forwards = NULL;
cfg->views = NULL;
cfg->acls = NULL; cfg->acls = NULL;
cfg->harden_short_bufsize = 0; cfg->harden_short_bufsize = 0;
cfg->harden_large_queries = 0; cfg->harden_large_queries = 0;
@ -993,6 +994,8 @@ config_delview(struct config_view* p)
if(!p) return; if(!p) return;
free(p->name); free(p->name);
config_deldblstrlist(p->local_zones); config_deldblstrlist(p->local_zones);
config_delstrlist(p->local_zones_nodefault);
config_delstrlist(p->local_data);
free(p); free(p);
} }
@ -1048,6 +1051,7 @@ config_delete(struct config_file* cfg)
config_del_strarray(cfg->out_ifs, cfg->num_out_ifs); config_del_strarray(cfg->out_ifs, cfg->num_out_ifs);
config_delstubs(cfg->stubs); config_delstubs(cfg->stubs);
config_delstubs(cfg->forwards); config_delstubs(cfg->forwards);
config_delviews(cfg->views);
config_delstrlist(cfg->donotqueryaddrs); config_delstrlist(cfg->donotqueryaddrs);
config_delstrlist(cfg->root_hints); config_delstrlist(cfg->root_hints);
free(cfg->identity); free(cfg->identity);