mirror of
https://github.com/nginx/nginx.git
synced 2026-08-27 04:07:18 +00:00
Core: improved ngx_conf_parse() error handling.
Previous code failed to properly restore cf->conf_file in case of ngx_close_file() errors, potentially resulting in double free of cf->conf_file->buffer->start. Found by Coverity (CID 1087507).
This commit is contained in:
parent
60169aa3a1
commit
aa28897b22
1 changed files with 1 additions and 1 deletions
|
|
@ -266,7 +266,7 @@ done:
|
|||
ngx_log_error(NGX_LOG_ALERT, cf->log, ngx_errno,
|
||||
ngx_close_file_n " %s failed",
|
||||
filename->data);
|
||||
return NGX_CONF_ERROR;
|
||||
rc = NGX_ERROR;
|
||||
}
|
||||
|
||||
cf->conf_file = prev;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue