mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-28 04:34:54 -04:00
Properly free up enqueued netievents in nm_destroy()
When the isc_netmgr is being destroyed, the normal and priority queues
should be dequeued and netievents properly freed. This wasn't the case.
(cherry picked from commit 88418c3372)
This commit is contained in:
parent
9862265cc9
commit
74948421a6
1 changed files with 3 additions and 3 deletions
|
|
@ -372,14 +372,14 @@ nm_destroy(isc_nm_t **mgr0) {
|
|||
|
||||
/* Empty the async event queues */
|
||||
while ((ievent = DEQUEUE_PRIORITY_NETIEVENT(worker)) != NULL) {
|
||||
isc_mem_put(mgr->mctx, ievent, sizeof(*ievent));
|
||||
isc__nm_put_netievent(mgr, ievent);
|
||||
}
|
||||
|
||||
INSIST(DEQUEUE_PRIVILEGED_NETIEVENT(worker) == NULL);
|
||||
INSIST(DEQUEUE_TASK_NETIEVENT(worker) == NULL);
|
||||
|
||||
while ((ievent = DEQUEUE_PRIORITY_NETIEVENT(worker)) != NULL) {
|
||||
isc_mem_put(mgr->mctx, ievent, sizeof(*ievent));
|
||||
while ((ievent = DEQUEUE_NORMAL_NETIEVENT(worker)) != NULL) {
|
||||
isc__nm_put_netievent(mgr, ievent);
|
||||
}
|
||||
isc_condition_destroy(&worker->cond_prio);
|
||||
isc_mutex_destroy(&worker->lock);
|
||||
|
|
|
|||
Loading…
Reference in a new issue