mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-20 23:00:56 -05:00
- Fix to create and destroy rpz_lock in auth_zones structure.
This commit is contained in:
parent
0758d29324
commit
d000523b00
2 changed files with 4 additions and 0 deletions
|
|
@ -5,6 +5,7 @@
|
|||
6 February 2020: Wouter
|
||||
- Fix num_reply_addr counting in mesh and tcp drop due to size
|
||||
after serve_stale commit.
|
||||
- Fix to create and destroy rpz_lock in auth_zones structure.
|
||||
|
||||
5 February 2020: George
|
||||
- Added serve-stale functionality as described in
|
||||
|
|
|
|||
|
|
@ -299,6 +299,8 @@ struct auth_zones* auth_zones_create(void)
|
|||
lock_protect(&az->lock, &az->ztree, sizeof(az->ztree));
|
||||
lock_protect(&az->lock, &az->xtree, sizeof(az->xtree));
|
||||
/* also lock protects the rbnode's in struct auth_zone, auth_xfer */
|
||||
lock_rw_init(&az->rpz_lock);
|
||||
lock_protect(&az->rpz_lock, &az->rpz_first, sizeof(az->rpz_first));
|
||||
return az;
|
||||
}
|
||||
|
||||
|
|
@ -2104,6 +2106,7 @@ void auth_zones_delete(struct auth_zones* az)
|
|||
{
|
||||
if(!az) return;
|
||||
lock_rw_destroy(&az->lock);
|
||||
lock_rw_destroy(&az->rpz_lock);
|
||||
traverse_postorder(&az->ztree, auth_zone_del, NULL);
|
||||
traverse_postorder(&az->xtree, auth_xfer_del, NULL);
|
||||
free(az);
|
||||
|
|
|
|||
Loading…
Reference in a new issue