mirror of
https://github.com/nginx/nginx.git
synced 2025-08-04 21:46:14 +08:00
fix segfault on close error
This commit is contained in:
parent
65eba4b692
commit
2a523f1c71
@ -258,14 +258,14 @@ done:
|
|||||||
if (filename) {
|
if (filename) {
|
||||||
ngx_free(cf->conf_file->buffer->start);
|
ngx_free(cf->conf_file->buffer->start);
|
||||||
|
|
||||||
cf->conf_file = prev;
|
|
||||||
|
|
||||||
if (ngx_close_file(fd) == NGX_FILE_ERROR) {
|
if (ngx_close_file(fd) == NGX_FILE_ERROR) {
|
||||||
ngx_log_error(NGX_LOG_ALERT, cf->log, ngx_errno,
|
ngx_log_error(NGX_LOG_ALERT, cf->log, ngx_errno,
|
||||||
ngx_close_file_n " %s failed",
|
ngx_close_file_n " %s failed",
|
||||||
cf->conf_file->file.name.data);
|
cf->conf_file->file.name.data);
|
||||||
return NGX_CONF_ERROR;
|
return NGX_CONF_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cf->conf_file = prev;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rc == NGX_ERROR) {
|
if (rc == NGX_ERROR) {
|
||||||
|
Loading…
Reference in New Issue
Block a user