diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/nxt_http_route.c | 4 | ||||
-rw-r--r-- | src/nxt_upstream.c | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/nxt_http_route.c b/src/nxt_http_route.c index c38acdf3..065b3488 100644 --- a/src/nxt_http_route.c +++ b/src/nxt_http_route.c @@ -1567,6 +1567,10 @@ nxt_http_route_find(nxt_http_routes_t *routes, nxt_str_t *name, { nxt_http_route_t **route, **end; + if (routes == NULL) { + return NXT_DECLINED; + } + route = &routes->route[0]; end = route + routes->items; diff --git a/src/nxt_upstream.c b/src/nxt_upstream.c index 9f81b286..de9b1d49 100644 --- a/src/nxt_upstream.c +++ b/src/nxt_upstream.c @@ -78,6 +78,10 @@ nxt_upstream_find(nxt_upstreams_t *upstreams, nxt_str_t *name, uint32_t i, n; nxt_upstream_t *upstream; + if (upstreams == NULL) { + return NXT_DECLINED; + } + upstream = &upstreams->upstream[0]; n = upstreams->items; |