Don't leak FD's while serving static files if they're not there
[citadel.git] / webcit / static.c
index 11b868ad5f56578214a9f1da1b0351f6ace2d5a6..145014bc932b821ab315ed88e80811f644f28201 100644 (file)
@@ -60,6 +60,7 @@ void output_static(const char *what)
                        begin_burst();
                        wc_printf("Cannot fstat %s: %s\n", what, strerror(errno));
                        end_burst();
+                       if (fd > 0) close(fd);
                        return;
                }