Mercurial > hg > nginx
diff src/http/modules/ngx_http_autoindex_module.c @ 1499:090e391f53db
fix file leak for HEAD requests
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Sat, 22 Sep 2007 17:56:05 +0000 |
parents | d8e2613a2b55 |
children | bf5521329069 |
line wrap: on
line diff
--- a/src/http/modules/ngx_http_autoindex_module.c Fri Sep 21 16:14:17 2007 +0000 +++ b/src/http/modules/ngx_http_autoindex_module.c Sat Sep 22 17:56:05 2007 +0000 @@ -236,6 +236,11 @@ 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; }