Added three missing checks for NULL after ngx_array_push() calls.
Found by Coverity.
This commit is contained in:
parent
52a8f1e7ef
commit
adc36b7c2b
3 changed files with 10 additions and 0 deletions
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue