mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-01-03 05:19:34 -05:00
- rpz-triggers, fix memory allocation trouble on allocation error path.
This commit is contained in:
parent
9f40e93fe6
commit
a9df16cf9b
1 changed files with 5 additions and 1 deletions
|
|
@ -387,11 +387,15 @@ rpz_clear(struct rpz* r)
|
|||
{
|
||||
/* must hold write lock on auth_zone */
|
||||
local_zones_delete(r->local_zones);
|
||||
r->local_zones = NULL;
|
||||
local_zones_delete(r->nsdname_zones);
|
||||
r->nsdname_zones = NULL;
|
||||
respip_set_delete(r->respip_set);
|
||||
r->respip_set = NULL;
|
||||
rpz_clientip_synthesized_set_delete(r->client_set);
|
||||
r->client_set = NULL;
|
||||
rpz_clientip_synthesized_set_delete(r->ns_set);
|
||||
// XXX: this approach seems to leak memory
|
||||
r->ns_set = NULL;
|
||||
if(!(r->local_zones = local_zones_create())){
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue