mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 06:25:31 +00:00
Add missing invocations of pthreads destructors
Add isc_mutex_destroy() and isc_rwlock_destroy() calls missing from the commits that introduced the relevant isc_mutex_init() and isc_rwlock_init() calls: -76bcb4d16b
-1595304312
-857f3bede3
None of these omissions affect any hot paths, so they are not expected to cause operational issues; correctness is the only concern here.
This commit is contained in:
@@ -2055,6 +2055,7 @@ destroy(dns_adb_t *adb) {
|
|||||||
dns_adbnamebucket_t *nbucket = NULL;
|
dns_adbnamebucket_t *nbucket = NULL;
|
||||||
isc_ht_iter_current(it, (void **)&nbucket);
|
isc_ht_iter_current(it, (void **)&nbucket);
|
||||||
cleanup_names(nbucket, INT_MAX);
|
cleanup_names(nbucket, INT_MAX);
|
||||||
|
isc_mutex_destroy(&nbucket->lock);
|
||||||
isc_mem_put(adb->mctx, nbucket, sizeof(*nbucket));
|
isc_mem_put(adb->mctx, nbucket, sizeof(*nbucket));
|
||||||
}
|
}
|
||||||
isc_ht_iter_destroy(&it);
|
isc_ht_iter_destroy(&it);
|
||||||
@@ -2070,6 +2071,7 @@ destroy(dns_adb_t *adb) {
|
|||||||
dns_adbentrybucket_t *ebucket = NULL;
|
dns_adbentrybucket_t *ebucket = NULL;
|
||||||
isc_ht_iter_current(it, (void **)&ebucket);
|
isc_ht_iter_current(it, (void **)&ebucket);
|
||||||
cleanup_entries(ebucket, INT_MAX);
|
cleanup_entries(ebucket, INT_MAX);
|
||||||
|
isc_mutex_destroy(&ebucket->lock);
|
||||||
isc_mem_put(adb->mctx, ebucket, sizeof(*ebucket));
|
isc_mem_put(adb->mctx, ebucket, sizeof(*ebucket));
|
||||||
}
|
}
|
||||||
isc_ht_iter_destroy(&it);
|
isc_ht_iter_destroy(&it);
|
||||||
|
@@ -10094,6 +10094,7 @@ destroy(dns_resolver_t *res) {
|
|||||||
}
|
}
|
||||||
isc_ht_iter_destroy(&it);
|
isc_ht_iter_destroy(&it);
|
||||||
isc_ht_destroy(&res->buckets);
|
isc_ht_destroy(&res->buckets);
|
||||||
|
isc_rwlock_destroy(&res->hash_lock);
|
||||||
|
|
||||||
isc_ht_iter_create(res->zonebuckets, &it);
|
isc_ht_iter_create(res->zonebuckets, &it);
|
||||||
for (result = isc_ht_iter_first(it); result == ISC_R_SUCCESS;
|
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_LIST_UNLINK(bucket->list, fc, link);
|
||||||
isc_mem_put(res->mctx, fc, sizeof(*fc));
|
isc_mem_put(res->mctx, fc, sizeof(*fc));
|
||||||
}
|
}
|
||||||
|
isc_mutex_destroy(&bucket->lock);
|
||||||
isc_mem_put(res->mctx, bucket, sizeof(*bucket));
|
isc_mem_put(res->mctx, bucket, sizeof(*bucket));
|
||||||
}
|
}
|
||||||
isc_ht_iter_destroy(&it);
|
isc_ht_iter_destroy(&it);
|
||||||
isc_ht_destroy(&res->zonebuckets);
|
isc_ht_destroy(&res->zonebuckets);
|
||||||
|
isc_rwlock_destroy(&res->zonehash_lock);
|
||||||
|
|
||||||
if (res->dispatches4 != NULL) {
|
if (res->dispatches4 != NULL) {
|
||||||
dns_dispatchset_destroy(&res->dispatches4);
|
dns_dispatchset_destroy(&res->dispatches4);
|
||||||
|
Reference in New Issue
Block a user