summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_runtime.c
diff options
context:
space:
mode:
authorMax Romanov <max.romanov@nginx.com>2019-03-22 15:32:40 +0300
committerMax Romanov <max.romanov@nginx.com>2019-03-22 15:32:40 +0300
commit1b7514dca386e26503eac90bd3518a950d7f9a5c (patch)
tree7c7ef7ecbe3ebf040c7386c69b103099e0bd2e0c /src/nxt_runtime.c
parent687f83fbd00b4f72da06f497f5bfe2af06716a3a (diff)
downloadunit-1b7514dca386e26503eac90bd3518a950d7f9a5c.tar.gz
unit-1b7514dca386e26503eac90bd3518a950d7f9a5c.tar.bz2
Destroying pool in case of error.
This closes #233 issue on GitHub. Thanks to 洪志道 (Hong Zhi Dao).
Diffstat (limited to '')
-rw-r--r--src/nxt_runtime.c3
1 files changed, 1 insertions, 2 deletions
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;