mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-06 08:02:05 -04:00
Merge branch 'michal/add-missing-destructor-invocations' into 'main'
Add missing invocations of pthreads destructors See merge request isc-projects/bind9!6499
This commit is contained in:
commit
788aa4b12f
2 changed files with 12 additions and 0 deletions
|
|
@ -871,6 +871,8 @@ unlink_name(dns_adbname_t *name) {
|
|||
} else {
|
||||
ISC_LIST_UNLINK(nbucket->names, name, plink);
|
||||
}
|
||||
|
||||
isc_refcount_decrement(&nbucket->references);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -944,6 +946,8 @@ unlink_entry(dns_adbentry_t *entry) {
|
|||
} else {
|
||||
ISC_LIST_UNLINK(ebucket->entries, entry, plink);
|
||||
}
|
||||
|
||||
isc_refcount_decrement(&ebucket->references);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -2055,6 +2059,8 @@ destroy(dns_adb_t *adb) {
|
|||
dns_adbnamebucket_t *nbucket = NULL;
|
||||
isc_ht_iter_current(it, (void **)&nbucket);
|
||||
cleanup_names(nbucket, INT_MAX);
|
||||
isc_mutex_destroy(&nbucket->lock);
|
||||
isc_refcount_destroy(&nbucket->references);
|
||||
isc_mem_put(adb->mctx, nbucket, sizeof(*nbucket));
|
||||
}
|
||||
isc_ht_iter_destroy(&it);
|
||||
|
|
@ -2070,6 +2076,8 @@ destroy(dns_adb_t *adb) {
|
|||
dns_adbentrybucket_t *ebucket = NULL;
|
||||
isc_ht_iter_current(it, (void **)&ebucket);
|
||||
cleanup_entries(ebucket, INT_MAX);
|
||||
isc_mutex_destroy(&ebucket->lock);
|
||||
isc_refcount_destroy(&ebucket->references);
|
||||
isc_mem_put(adb->mctx, ebucket, sizeof(*ebucket));
|
||||
}
|
||||
isc_ht_iter_destroy(&it);
|
||||
|
|
@ -2078,6 +2086,7 @@ destroy(dns_adb_t *adb) {
|
|||
isc_rwlock_destroy(&adb->entries_lock);
|
||||
|
||||
isc_mutex_destroy(&adb->lock);
|
||||
isc_refcount_destroy(&adb->references);
|
||||
|
||||
isc_task_detach(&adb->task);
|
||||
isc_stats_detach(&adb->stats);
|
||||
|
|
|
|||
|
|
@ -10094,6 +10094,7 @@ destroy(dns_resolver_t *res) {
|
|||
}
|
||||
isc_ht_iter_destroy(&it);
|
||||
isc_ht_destroy(&res->buckets);
|
||||
isc_rwlock_destroy(&res->hash_lock);
|
||||
|
||||
isc_ht_iter_create(res->zonebuckets, &it);
|
||||
for (result = isc_ht_iter_first(it); result == ISC_R_SUCCESS;
|
||||
|
|
@ -10109,10 +10110,12 @@ destroy(dns_resolver_t *res) {
|
|||
ISC_LIST_UNLINK(bucket->list, fc, link);
|
||||
isc_mem_put(res->mctx, fc, sizeof(*fc));
|
||||
}
|
||||
isc_mutex_destroy(&bucket->lock);
|
||||
isc_mem_put(res->mctx, bucket, sizeof(*bucket));
|
||||
}
|
||||
isc_ht_iter_destroy(&it);
|
||||
isc_ht_destroy(&res->zonebuckets);
|
||||
isc_rwlock_destroy(&res->zonehash_lock);
|
||||
|
||||
if (res->dispatches4 != NULL) {
|
||||
dns_dispatchset_destroy(&res->dispatches4);
|
||||
|
|
|
|||
Loading…
Reference in a new issue