Allocating process init struct from runtime memory pool.

This avoids memory leak reports from the address sanitizer.
This commit is contained in:
Max Romanov
2019-10-29 15:33:45 +03:00
parent 4a79e9631b
commit 65b03a14a7
2 changed files with 14 additions and 17 deletions

View File

@@ -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);
}