Proxy: error checking for array init, missed in 7716:d6a5e14aa3e4.
Found by Coverity (CID 1467637).
This commit is contained in:
parent
d1cd8c4888
commit
74f0a26f66
1 changed files with 3 additions and 1 deletions
|
@ -2679,7 +2679,9 @@ ngx_http_proxy_rewrite_cookie(ngx_http_request_t *r, ngx_table_elt_t *h)
|
||||||
ngx_keyval_t *attr;
|
ngx_keyval_t *attr;
|
||||||
ngx_http_proxy_loc_conf_t *plcf;
|
ngx_http_proxy_loc_conf_t *plcf;
|
||||||
|
|
||||||
ngx_array_init(&attrs, r->pool, 2, sizeof(ngx_keyval_t));
|
if (ngx_array_init(&attrs, r->pool, 2, sizeof(ngx_keyval_t)) != NGX_OK) {
|
||||||
|
return NGX_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
if (ngx_http_proxy_parse_cookie(&h->value, &attrs) != NGX_OK) {
|
if (ngx_http_proxy_parse_cookie(&h->value, &attrs) != NGX_OK) {
|
||||||
return NGX_ERROR;
|
return NGX_ERROR;
|
||||||
|
|
Loading…
Reference in a new issue