summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/http/ngx_http_upstream.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c
index 3730a2026..2cbb2cb93 100644
--- a/src/http/ngx_http_upstream.c
+++ b/src/http/ngx_http_upstream.c
@@ -4422,18 +4422,18 @@ ngx_http_upstream_add(ngx_conf_t *cf, ngx_url_t *u, ngx_uint_t flags)
uscf->servers = ngx_array_create(cf->pool, 1,
sizeof(ngx_http_upstream_server_t));
if (uscf->servers == NULL) {
- return NGX_CONF_ERROR;
+ return NULL;
}
us = ngx_array_push(uscf->servers);
if (us == NULL) {
- return NGX_CONF_ERROR;
+ return NULL;
}
ngx_memzero(us, sizeof(ngx_http_upstream_server_t));
us->addrs = u->addrs;
- us->naddrs = u->naddrs;
+ us->naddrs = 1;
}
uscfp = ngx_array_push(&umcf->upstreams);