From 1b7514dca386e26503eac90bd3518a950d7f9a5c Mon Sep 17 00:00:00 2001 From: Max Romanov Date: Fri, 22 Mar 2019 15:32:40 +0300 Subject: Destroying pool in case of error. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This closes #233 issue on GitHub. Thanks to 洪志道 (Hong Zhi Dao). --- src/nxt_runtime.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/nxt_runtime.c') diff --git a/src/nxt_runtime.c b/src/nxt_runtime.c index 547c7494..06478f72 100644 --- a/src/nxt_runtime.c +++ b/src/nxt_runtime.c @@ -53,14 +53,13 @@ nxt_runtime_create(nxt_task_t *task) nxt_app_lang_module_t *lang; mp = nxt_mp_create(1024, 128, 256, 32); - if (nxt_slow_path(mp == NULL)) { return NXT_ERROR; } rt = nxt_mp_zget(mp, sizeof(nxt_runtime_t)); if (nxt_slow_path(rt == NULL)) { - return NXT_ERROR; + goto fail; } task->thread->runtime = rt; -- cgit