commit 0d6a188b0146dcb491eba9121eb76f0c84634bac
parent 61b385ae11f0d8148f1aeac3a2e8cb5fbac5ec8b
Author: Joris Vink <joris@coders.se>
Date: Mon, 17 Dec 2018 16:22:36 +0100
close fd if we're a directory in filemap.
Diffstat:
1 file changed, 1 insertion(+), 0 deletions(-)
diff --git a/src/filemap.c b/src/filemap.c
@@ -280,6 +280,7 @@ lookup:
fd = -1;
}
} else if (S_ISDIR(st.st_mode) && index == 0) {
+ close(fd);
if (req->path[strlen(req->path) - 1] != '/') {
(void)snprintf(fpath,
sizeof(fpath), "%s/", req->path);