Mercurial > hg > nginx
changeset 1534:13d5d23a5344 stable-0.5
r1500 merge:
fix file leak for HEAD requests
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Sun, 23 Sep 2007 19:30:51 +0000 |
parents | 9b10ba85b249 |
children | d82f8d4ed369 |
files | src/http/modules/ngx_http_autoindex_module.c |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/http/modules/ngx_http_autoindex_module.c Sun Sep 23 19:29:22 2007 +0000 +++ b/src/http/modules/ngx_http_autoindex_module.c Sun Sep 23 19:30:51 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; }