Mercurial > hg > nginx
diff src/core/ngx_conf_file.c @ 2338:5cbf2da3a324
fix segfault on close error
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Tue, 25 Nov 2008 14:45:44 +0000 |
parents | 81d506883bba |
children | 2142237f66da |
line wrap: on
line diff
--- a/src/core/ngx_conf_file.c Tue Nov 25 14:25:20 2008 +0000 +++ b/src/core/ngx_conf_file.c Tue Nov 25 14:45:44 2008 +0000 @@ -258,14 +258,14 @@ 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) {