From 0b02e74abcb460ef61292ae3fe015489d51946a3 Mon Sep 17 00:00:00 2001 From: Tiago Natel Date: Mon, 28 Oct 2019 15:49:03 +0000 Subject: [PATCH] Releasing the memory of removed thread pools at exit. --- src/nxt_runtime.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/nxt_runtime.c b/src/nxt_runtime.c index 9efe7500..0d20895c 100644 --- a/src/nxt_runtime.c +++ b/src/nxt_runtime.c @@ -658,6 +658,8 @@ nxt_runtime_thread_pool_exit(nxt_task_t *task, void *obj, void *data) if (tp == thread_pools[i]) { nxt_array_remove(rt->thread_pools, &thread_pools[i]); + nxt_free(tp); + if (n == 1) { /* The last thread pool. */ rt->continuation(task, 0);