Mercurial > hg > nginx
comparison 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 |
comparison
equal
deleted
inserted
replaced
4810:e1d11fb9a71f | 4811:21d1e3bcb356 |
---|---|
719 "connection limit must be less 65536"); | 719 "connection limit must be less 65536"); |
720 return NGX_CONF_ERROR; | 720 return NGX_CONF_ERROR; |
721 } | 721 } |
722 | 722 |
723 limit = ngx_array_push(&lccf->limits); | 723 limit = ngx_array_push(&lccf->limits); |
724 if (limit == NULL) { | |
725 return NGX_CONF_ERROR; | |
726 } | |
727 | |
724 limit->conn = n; | 728 limit->conn = n; |
725 limit->shm_zone = shm_zone; | 729 limit->shm_zone = shm_zone; |
726 | 730 |
727 return NGX_CONF_OK; | 731 return NGX_CONF_OK; |
728 } | 732 } |