Added three missing checks for NULL after ngx_array_push() calls.

Found by Coverity.
This commit is contained in:
Valentin Bartenev 2012-08-08 12:03:46 +00:00
parent 2af80d5fab
commit 86dd5bde45
3 changed files with 10 additions and 0 deletions

View File

@ -1626,6 +1626,9 @@ ngx_http_fastcgi_process_header(ngx_http_request_t *r)
}
part = ngx_array_push(f->split_parts);
if (part == NULL) {
return NGX_ERROR;
}
part->start = part_start;
part->end = part_end;

View File

@ -721,6 +721,10 @@ ngx_http_limit_conn(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
}
limit = ngx_array_push(&lccf->limits);
if (limit == NULL) {
return NGX_CONF_ERROR;
}
limit->conn = n;
limit->shm_zone = shm_zone;

View File

@ -937,6 +937,9 @@ ngx_http_limit_req(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
}
limit = ngx_array_push(&lrcf->limits);
if (limit == NULL) {
return NGX_CONF_ERROR;
}
limit->shm_zone = shm_zone;
limit->burst = burst * 1000;