From: Ruslan Ermilov Date: Sun, 29 Jul 2012 19:38:25 +0000 (+0000) Subject: ngx_http_upstream_add() should return NULL if an error occurs. X-Git-Tag: release-1.3.4~7 X-Git-Url: http://www.kaiwu.me/postgresql/commit/?a=commitdiff_plain;h=b1630108729e1f458a06622a474b51e533b34f1c;p=nginx.git 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 index 3730a2026..9ad398117 100644 --- 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, 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));