mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-09-07 10:27:44 +02:00
- Fix to clean memory leak of respip_addr.lock when ip_tree deleted.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user