diff options
author | Igor Sysoev <igor@sysoev.ru> | 2008-11-25 14:45:44 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2008-11-25 14:45:44 +0000 |
commit | 2a523f1c71ebb8659543e87d2bfcae3057d78c1e (patch) | |
tree | 159fd84cfc405199d471fbd638aca002731db2f0 | |
parent | 65eba4b692e4f3846b7f3e9824f03c9767cf25f6 (diff) | |
download | nginx-2a523f1c71ebb8659543e87d2bfcae3057d78c1e.tar.gz nginx-2a523f1c71ebb8659543e87d2bfcae3057d78c1e.zip |
fix segfault on close error
-rw-r--r-- | src/core/ngx_conf_file.c | 4 |
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) { |