summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nxt_http_route.c6
-rw-r--r--src/nxt_router.c4
-rw-r--r--src/nxt_upstream.c4
3 files changed, 11 insertions, 3 deletions
diff --git a/src/nxt_http_route.c b/src/nxt_http_route.c
index 0b2103cd..36e003ae 100644
--- a/src/nxt_http_route.c
+++ b/src/nxt_http_route.c
@@ -1594,6 +1594,7 @@ nxt_http_action_t *
nxt_http_action_create(nxt_task_t *task, nxt_router_temp_conf_t *tmcf,
nxt_str_t *name)
{
+ nxt_int_t ret;
nxt_http_action_t *action;
action = nxt_mp_alloc(tmcf->router_conf->mem_pool,
@@ -1605,7 +1606,10 @@ nxt_http_action_create(nxt_task_t *task, nxt_router_temp_conf_t *tmcf,
action->name = *name;
action->handler = NULL;
- nxt_http_action_resolve(task, tmcf, action);
+ ret = nxt_http_action_resolve(task, tmcf, action);
+ if (nxt_slow_path(ret != NXT_OK)) {
+ return NULL;
+ }
return action;
}
diff --git a/src/nxt_router.c b/src/nxt_router.c
index ea14c6fb..b7408c3c 100644
--- a/src/nxt_router.c
+++ b/src/nxt_router.c
@@ -1725,6 +1725,10 @@ nxt_router_conf_create(nxt_task_t *task, nxt_router_temp_conf_t *tmcf,
tmcf->router_conf,
&lscf.application);
}
+
+ if (nxt_slow_path(skcf->action == NULL)) {
+ goto fail;
+ }
}
}
diff --git a/src/nxt_upstream.c b/src/nxt_upstream.c
index c8ecbbe6..9f81b286 100644
--- a/src/nxt_upstream.c
+++ b/src/nxt_upstream.c
@@ -86,11 +86,11 @@ nxt_upstream_find(nxt_upstreams_t *upstreams, nxt_str_t *name,
action->u.upstream_number = i;
action->handler = nxt_upstream_handler;
- return NXT_DECLINED;
+ return NXT_OK;
}
}
- return NXT_OK;
+ return NXT_DECLINED;
}