Mercurial > hg > nginx
diff src/http/modules/ngx_http_limit_conn_module.c @ 4811:21d1e3bcb356
Added three missing checks for NULL after ngx_array_push() calls.
Found by Coverity.
author | Valentin Bartenev <vbart@nginx.com> |
---|---|
date | Wed, 08 Aug 2012 12:03:46 +0000 |
parents | daa60662b7b5 |
children | 9f4cdc7a8578 |
line wrap: on
line diff
--- a/src/http/modules/ngx_http_limit_conn_module.c +++ b/src/http/modules/ngx_http_limit_conn_module.c @@ -721,6 +721,10 @@ ngx_http_limit_conn(ngx_conf_t *cf, ngx_ } limit = ngx_array_push(&lccf->limits); + if (limit == NULL) { + return NGX_CONF_ERROR; + } + limit->conn = n; limit->shm_zone = shm_zone;