nghttpd: Fix resource leak

This commit is contained in:
Tatsuhiro Tsujikawa 2014-11-08 23:07:40 +09:00
parent c59ffa09e0
commit 2ba9a009fe
1 changed files with 2 additions and 0 deletions

View File

@ -941,6 +941,8 @@ void prepare_response(Stream *stream, Http2Handler *hd, bool allow_push = true)
}
if(buf.st_mode & S_IFDIR) {
close(file);
if(query_pos == std::string::npos) {
reqpath += "/";
} else {