summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorValentin Bartenev <vbart@nginx.com>2020-03-27 17:22:52 +0300
committerValentin Bartenev <vbart@nginx.com>2020-03-27 17:22:52 +0300
commit5f9c4754cbb1dfec0156b4473d1b31a4da8a3e3d (patch)
tree350b523adea160fef6a62d2bce016a94f2b5b445 /src
parent8532cf6ae6e9ed7d03dd7e06e36eee63fd9d6ceb (diff)
downloadunit-5f9c4754cbb1dfec0156b4473d1b31a4da8a3e3d.tar.gz
unit-5f9c4754cbb1dfec0156b4473d1b31a4da8a3e3d.tar.bz2
Initialization of the action object made more consistent.
Diffstat (limited to '')
-rw-r--r--src/nxt_http_route.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nxt_http_route.c b/src/nxt_http_route.c
index d7f20bcb..ffa5f6e7 100644
--- a/src/nxt_http_route.c
+++ b/src/nxt_http_route.c
@@ -432,8 +432,6 @@ nxt_http_route_match_create(nxt_task_t *task, nxt_router_temp_conf_t *tmcf,
return NULL;
}
- match->action.u.route = NULL;
- match->action.handler = NULL;
match->items = n;
action_conf = nxt_conf_get_path(cv, &action_path);
@@ -613,6 +611,8 @@ nxt_http_route_action_create(nxt_router_temp_conf_t *tmcf, nxt_conf_value_t *cv,
return ret;
}
+ nxt_memzero(action, sizeof(nxt_http_action_t));
+
conf = accf.pass;
if (accf.share != NULL) {
@@ -633,7 +633,7 @@ nxt_http_route_action_create(nxt_router_temp_conf_t *tmcf, nxt_conf_value_t *cv,
}
if (accf.fallback != NULL) {
- action->u.fallback = nxt_mp_zalloc(mp, sizeof(nxt_http_action_t));
+ action->u.fallback = nxt_mp_alloc(mp, sizeof(nxt_http_action_t));
if (nxt_slow_path(action->u.fallback == NULL)) {
return NXT_ERROR;
}