# HG changeset patch # User Ruslan Ermilov # Date 1343590705 0 # Node ID c48902a053d6255b211f681a36caa4e94fda06d3 # Parent 0ed8088f43b4eb86437bd4549ff8c45082119e29 ngx_http_upstream_add() should return NULL if an error occurs. diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c --- a/src/http/ngx_http_upstream.c +++ b/src/http/ngx_http_upstream.c @@ -4422,12 +4422,12 @@ ngx_http_upstream_add(ngx_conf_t *cf, ng 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));