- Fix to clean memory leak of respip_addr.lock when ip_tree deleted.

This commit is contained in:
W.C.A. Wijngaards 2020-02-12 11:49:26 +01:00
parent e965775064
commit 7dcfe531e4
2 changed files with 10 additions and 0 deletions

View file

@ -2,6 +2,7 @@
- Fix with libnettle make test with dsa disabled.
- Fix contrib/fastrpz.patch to apply cleanly. Fix for serve-stale
fixes, but it does not compile, conflicts with new rpz code.
- Fix to clean memory leak of respip_addr.lock when ip_tree deleted.
10 February 2020: George
- Document 'ub_result.was_ratelimited' in libunbound.

View file

@ -69,12 +69,21 @@ respip_set_create(void)
return set;
}
/** helper traverse to delete resp_addr nodes */
static void
resp_addr_del(rbnode_type* n, void* ATTR_UNUSED(arg))
{
struct resp_addr* r = (struct resp_addr*)n->key;
lock_rw_destroy(&r->lock);
}
void
respip_set_delete(struct respip_set* set)
{
if(!set)
return;
lock_rw_destroy(&set->lock);
traverse_postorder(&set->ip_tree, resp_addr_del, NULL);
regional_destroy(set->region);
free(set);
}