mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-02-17 17:48:16 -05:00
- Fix to clean memory leak of respip_addr.lock when ip_tree deleted.
This commit is contained in:
parent
e965775064
commit
7dcfe531e4
2 changed files with 10 additions and 0 deletions
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue