diff --git a/src/filemap.c b/src/filemap.c index a0dd94f..80ed2ea 100644 --- 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);