From 2ba9a009fe5fcab0bd1be5551c76815944c29bc6 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Sat, 8 Nov 2014 23:07:40 +0900 Subject: [PATCH] nghttpd: Fix resource leak --- src/HttpServer.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/HttpServer.cc b/src/HttpServer.cc index 6b0a6a80..6d343be1 100644 --- a/src/HttpServer.cc +++ b/src/HttpServer.cc @@ -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 {