summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_runtime.c
diff options
context:
space:
mode:
authorMax Romanov <max.romanov@nginx.com>2019-10-29 15:33:45 +0300
committerMax Romanov <max.romanov@nginx.com>2019-10-29 15:33:45 +0300
commit65b03a14a7b48ae0e1dc34b74e05f01574a5424f (patch)
tree78835d2701380aba35087fe432b4efd73c139dc3 /src/nxt_runtime.c
parent4a79e9631b06b82b1a14057fe6febcbd69d4ed4e (diff)
downloadunit-65b03a14a7b48ae0e1dc34b74e05f01574a5424f.tar.gz
unit-65b03a14a7b48ae0e1dc34b74e05f01574a5424f.tar.bz2
Allocating process init struct from runtime memory pool.
This avoids memory leak reports from the address sanitizer.
Diffstat (limited to 'src/nxt_runtime.c')
-rw-r--r--src/nxt_runtime.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nxt_runtime.c b/src/nxt_runtime.c
index 0d20895c..cf03c888 100644
--- a/src/nxt_runtime.c
+++ b/src/nxt_runtime.c
@@ -1318,6 +1318,10 @@ nxt_runtime_process_destroy(nxt_runtime_t *rt, nxt_process_t *process)
nxt_thread_mutex_destroy(&process->outgoing.mutex);
nxt_thread_mutex_destroy(&process->cp_mutex);
+ if (process->init != NULL) {
+ nxt_mp_free(rt->mem_pool, process->init);
+ }
+
nxt_mp_free(rt->mem_pool, process);
}