Mercurial > hg > nginx
changeset 4765:c48902a053d6
ngx_http_upstream_add() should return NULL if an error occurs.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Sun, 29 Jul 2012 19:38:25 +0000 |
parents | 0ed8088f43b4 |
children | 284cb8fb0741 |
files | src/http/ngx_http_upstream.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/http/ngx_http_upstream.c Thu Jul 26 14:47:42 2012 +0000 +++ b/src/http/ngx_http_upstream.c Sun Jul 29 19:38:25 2012 +0000 @@ -4422,12 +4422,12 @@ 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));