mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 05:57:52 +00:00
Expire names in shutdown_names() under the lock
Since there could be fetches running, we need to run expire_name() under the lock when shutting down the names.
This commit is contained in:
parent
32c2acf6fc
commit
b8c7dc2dc2
@ -766,6 +766,8 @@ shutdown_names(dns_adb_t *adb) {
|
||||
name = next)
|
||||
{
|
||||
next = ISC_LIST_NEXT(name, link);
|
||||
dns_adbname_ref(name);
|
||||
LOCK(&name->lock);
|
||||
/*
|
||||
* Run through the list. For each name, clean up finds
|
||||
* found there, and cancel any fetches running. When
|
||||
@ -773,6 +775,8 @@ shutdown_names(dns_adb_t *adb) {
|
||||
* itself.
|
||||
*/
|
||||
expire_name(name, DNS_EVENT_ADBSHUTDOWN, INT_MAX);
|
||||
UNLOCK(&name->lock);
|
||||
dns_adbname_detach(&name);
|
||||
}
|
||||
UNLOCK(&adb->names_lock);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user