mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-10 02:30:00 -04:00
Destroy task first when destroying catzs.
When freeing catzs structures we need to kill the updater task first.
Otherwise we might race with the updater and there might be a crash
on shutdown.
This commit is contained in:
parent
541872bf3b
commit
c1d111cd2e
1 changed files with 2 additions and 2 deletions
|
|
@ -795,7 +795,7 @@ dns_catz_catzs_detach(dns_catz_zones_t **catzsp) {
|
|||
*catzsp = NULL;
|
||||
|
||||
if (isc_refcount_decrement(&catzs->refs) == 1) {
|
||||
isc_refcount_destroy(&catzs->refs);
|
||||
isc_task_destroy(&catzs->updater);
|
||||
DESTROYLOCK(&catzs->lock);
|
||||
if (catzs->zones != NULL) {
|
||||
isc_ht_iter_t *iter = NULL;
|
||||
|
|
@ -815,7 +815,7 @@ dns_catz_catzs_detach(dns_catz_zones_t **catzsp) {
|
|||
INSIST(isc_ht_count(catzs->zones) == 0);
|
||||
isc_ht_destroy(&catzs->zones);
|
||||
}
|
||||
isc_task_destroy(&catzs->updater);
|
||||
isc_refcount_destroy(&catzs->refs);
|
||||
isc_mem_putanddetach(&catzs->mctx, catzs, sizeof(*catzs));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue