summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nxt_controller.c1
-rw-r--r--src/nxt_runtime.c3
2 files changed, 2 insertions, 2 deletions
diff --git a/src/nxt_controller.c b/src/nxt_controller.c
index 29838bd9..d5534f49 100644
--- a/src/nxt_controller.c
+++ b/src/nxt_controller.c
@@ -184,6 +184,7 @@ nxt_controller_start(nxt_task_t *task, void *data)
vldt.pool = nxt_mp_create(1024, 128, 256, 32);
if (nxt_slow_path(vldt.pool == NULL)) {
+ nxt_mp_destroy(mp);
return NXT_ERROR;
}
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;