diff options
Diffstat (limited to '')
-rw-r--r-- | src/nxt_thread_pool.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nxt_thread_pool.c b/src/nxt_thread_pool.c index c8959dc6..56efa1a0 100644 --- a/src/nxt_thread_pool.c +++ b/src/nxt_thread_pool.c @@ -83,7 +83,7 @@ nxt_thread_pool_init(nxt_thread_pool_t *tp) if (nxt_fast_path(nxt_sem_init(&tp->sem, 0) == NXT_OK)) { - link = nxt_malloc(sizeof(nxt_thread_link_t)); + link = nxt_zalloc(sizeof(nxt_thread_link_t)); if (nxt_fast_path(link != NULL)) { link->start = nxt_thread_pool_start; @@ -237,7 +237,7 @@ nxt_thread_pool_destroy(nxt_thread_pool_t *tp) if (!tp->ready) { nxt_work_queue_add(&thr->engine->fast_work_queue, tp->exit, - &tp->task, tp, NULL); + &tp->engine->task, tp, NULL); return; } @@ -296,7 +296,7 @@ nxt_thread_pool_exit(nxt_task_t *task, void *obj, void *data) nxt_sem_destroy(&tp->sem); - nxt_work_set(&tp->work, nxt_thread_pool_exit, &tp->task, tp, + nxt_work_set(&tp->work, tp->exit, &tp->engine->task, tp, (void *) (uintptr_t) thread->handle); nxt_event_engine_post(tp->engine, &tp->work); |