mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-28 04:34:54 -04:00
Merge branch 'wpk/fix-leaking-mutexes-and-conditionals' into 'master'
Add missing isc_mutex_destroy and isc_conditional_destroy calls. Closes #1893 See merge request isc-projects/bind9!3600
This commit is contained in:
commit
f027763d3a
5 changed files with 16 additions and 0 deletions
3
CHANGES
3
CHANGES
|
|
@ -1,3 +1,6 @@
|
|||
5420. [bug] Add missing isc_{mutex,conditional}_destroy calls
|
||||
that caused a memory leak on FreeBSD. [GL #1893]
|
||||
|
||||
5419. [func] "dig +qid=<num>" sets the query ID to an arbitrary
|
||||
value. "configure --enable-singletrace" allows
|
||||
trace logging of a single query when QID is set to 0.
|
||||
|
|
|
|||
|
|
@ -10086,6 +10086,7 @@ named_server_destroy(named_server_t **serverp) {
|
|||
dst_lib_destroy();
|
||||
|
||||
isc_event_free(&server->reload_event);
|
||||
isc_mutex_destroy(&server->reload_event_lock);
|
||||
|
||||
INSIST(ISC_LIST_EMPTY(server->kasplist));
|
||||
INSIST(ISC_LIST_EMPTY(server->viewlist));
|
||||
|
|
|
|||
|
|
@ -121,3 +121,6 @@ Bug Fixes
|
|||
- When built without LMDB support, ``named`` failed to restart after a
|
||||
zone with a double quote (") in its name was added with ``rndc
|
||||
addzone``. Thanks to Alberto Fernández. [GL #1695]
|
||||
|
||||
- Missing mutex and conditional destruction in netmgr code leads to a
|
||||
memory leak on *BSD systems. [GL #1893]
|
||||
|
|
|
|||
|
|
@ -276,6 +276,9 @@ nm_destroy(isc_nm_t **mgr0) {
|
|||
|
||||
isc_queue_destroy(worker->ievents);
|
||||
isc_queue_destroy(worker->ievents_prio);
|
||||
isc_mutex_destroy(&worker->lock);
|
||||
isc_condition_destroy(&worker->cond);
|
||||
|
||||
isc_mem_put(mgr->mctx, worker->recvbuf,
|
||||
ISC_NETMGR_RECVBUF_SIZE);
|
||||
isc_thread_join(worker->thread, NULL);
|
||||
|
|
@ -768,9 +771,12 @@ nmsocket_cleanup(isc_nmsocket_t *sock, bool dofree) {
|
|||
}
|
||||
|
||||
isc_astack_destroy(sock->inactivereqs);
|
||||
sock->magic = 0;
|
||||
|
||||
isc_mem_free(sock->mgr->mctx, sock->ah_frees);
|
||||
isc_mem_free(sock->mgr->mctx, sock->ah_handles);
|
||||
isc_mutex_destroy(&sock->lock);
|
||||
isc_condition_destroy(&sock->cond);
|
||||
|
||||
if (dofree) {
|
||||
isc_nm_t *mgr = sock->mgr;
|
||||
|
|
|
|||
|
|
@ -1356,9 +1356,12 @@ static void
|
|||
manager_free(isc__taskmgr_t *manager) {
|
||||
for (unsigned int i = 0; i < manager->workers; i++) {
|
||||
isc_mutex_destroy(&manager->queues[i].lock);
|
||||
isc_condition_destroy(&manager->queues[i].work_available);
|
||||
}
|
||||
isc_mutex_destroy(&manager->lock);
|
||||
isc_mutex_destroy(&manager->excl_lock);
|
||||
isc_mutex_destroy(&manager->halt_lock);
|
||||
isc_condition_destroy(&manager->halt_cond);
|
||||
isc_mem_put(manager->mctx, manager->queues,
|
||||
manager->workers * sizeof(isc__taskqueue_t));
|
||||
manager->common.impmagic = 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue