diff options
author | Igor Sysoev <igor@sysoev.ru> | 2007-09-23 23:30:51 +0400 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2007-09-23 23:30:51 +0400 |
commit | 8f88206ad297428fe24489b3f30de0c8fb04d4d3 (patch) | |
tree | f3bf5766e32a6be5b14c69865a3ea1ffcaa47697 | |
parent | 39a3f35b3d682538ce6dbd70f417e43e4d5f6156 (diff) |
r1500 merge:
fix file leak for HEAD requests
-rw-r--r-- | src/http/modules/ngx_http_autoindex_module.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/http/modules/ngx_http_autoindex_module.c b/src/http/modules/ngx_http_autoindex_module.c index e08e63c8f..ae9eaabbb 100644 --- a/src/http/modules/ngx_http_autoindex_module.c +++ b/src/http/modules/ngx_http_autoindex_module.c @@ -236,6 +236,11 @@ ngx_http_autoindex_handler(ngx_http_request_t *r) rc = ngx_http_send_header(r); if (rc == NGX_ERROR || rc > NGX_OK || r->header_only) { + if (ngx_close_dir(&dir) == NGX_ERROR) { + ngx_log_error(NGX_LOG_ALERT, r->connection->log, ngx_errno, + ngx_close_dir_n " \"%V\" failed", &path); + } + return rc; } |