diff options
author | Max Romanov <max.romanov@nginx.com> | 2019-10-29 15:33:45 +0300 |
---|---|---|
committer | Max Romanov <max.romanov@nginx.com> | 2019-10-29 15:33:45 +0300 |
commit | 65b03a14a7b48ae0e1dc34b74e05f01574a5424f (patch) | |
tree | 78835d2701380aba35087fe432b4efd73c139dc3 /src/nxt_runtime.c | |
parent | 4a79e9631b06b82b1a14057fe6febcbd69d4ed4e (diff) | |
download | unit-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.c | 4 |
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); } |