diff options
| author | Ruslan Ermilov <ru@nginx.com> | 2012-07-29 19:38:25 +0000 |
|---|---|---|
| committer | Ruslan Ermilov <ru@nginx.com> | 2012-07-29 19:38:25 +0000 |
| commit | b1630108729e1f458a06622a474b51e533b34f1c (patch) | |
| tree | cc173145716f6391328f92cb02d988637489cc04 | |
| parent | 01f07bde7ea9cdc683864fe49d83d36cffa2caac (diff) | |
| download | nginx-b1630108729e1f458a06622a474b51e533b34f1c.tar.gz nginx-b1630108729e1f458a06622a474b51e533b34f1c.tar.bz2 | |
ngx_http_upstream_add() should return NULL if an error occurs.
| -rw-r--r-- | src/http/ngx_http_upstream.c | 4 |
1 files changed, 2 insertions, 2 deletions
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)); |
