mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 14:07:59 +00:00
Merge branch 'ondrej-cleanup-nm_destroy-dequeue' into 'main'
Properly free up enqueued netievents in nm_destroy() See merge request isc-projects/bind9!5888
This commit is contained in:
@@ -372,14 +372,14 @@ nm_destroy(isc_nm_t **mgr0) {
|
|||||||
|
|
||||||
/* Empty the async event queues */
|
/* Empty the async event queues */
|
||||||
while ((ievent = DEQUEUE_PRIORITY_NETIEVENT(worker)) != NULL) {
|
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_PRIVILEGED_NETIEVENT(worker) == NULL);
|
||||||
INSIST(DEQUEUE_TASK_NETIEVENT(worker) == NULL);
|
INSIST(DEQUEUE_TASK_NETIEVENT(worker) == NULL);
|
||||||
|
|
||||||
while ((ievent = DEQUEUE_PRIORITY_NETIEVENT(worker)) != NULL) {
|
while ((ievent = DEQUEUE_NORMAL_NETIEVENT(worker)) != NULL) {
|
||||||
isc_mem_put(mgr->mctx, ievent, sizeof(*ievent));
|
isc__nm_put_netievent(mgr, ievent);
|
||||||
}
|
}
|
||||||
isc_condition_destroy(&worker->cond_prio);
|
isc_condition_destroy(&worker->cond_prio);
|
||||||
isc_mutex_destroy(&worker->lock);
|
isc_mutex_destroy(&worker->lock);
|
||||||
|
Reference in New Issue
Block a user