Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nginx/nginx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2008-11-25 17:45:44 +0300
committerIgor Sysoev <igor@sysoev.ru>2008-11-25 17:45:44 +0300
commit2a523f1c71ebb8659543e87d2bfcae3057d78c1e (patch)
tree159fd84cfc405199d471fbd638aca002731db2f0 /src/core/ngx_conf_file.c
parent65eba4b692e4f3846b7f3e9824f03c9767cf25f6 (diff)
fix segfault on close error
Diffstat (limited to 'src/core/ngx_conf_file.c')
-rw-r--r--src/core/ngx_conf_file.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/ngx_conf_file.c b/src/core/ngx_conf_file.c
index d06c4da8e..60ba330b8 100644
--- a/src/core/ngx_conf_file.c
+++ b/src/core/ngx_conf_file.c
@@ -258,14 +258,14 @@ done:
if (filename) {
ngx_free(cf->conf_file->buffer->start);
- cf->conf_file = prev;
-
if (ngx_close_file(fd) == NGX_FILE_ERROR) {
ngx_log_error(NGX_LOG_ALERT, cf->log, ngx_errno,
ngx_close_file_n " %s failed",
cf->conf_file->file.name.data);
return NGX_CONF_ERROR;
}
+
+ cf->conf_file = prev;
}
if (rc == NGX_ERROR) {