projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bab826b
)
Don't leak FD's while serving static files if they're not there
author
Wilfried Goesgens
<dothebart@citadel.org>
Fri, 26 Nov 2010 13:44:31 +0000
(14:44 +0100)
committer
Wilfried Goesgens
<dothebart@citadel.org>
Sat, 27 Nov 2010 12:58:52 +0000
(13:58 +0100)
Ok, this case is rather theoretic, but if for some reason files disappear
after webcits start initialising, we might hit this point.
webcit/static.c
patch
|
blob
|
history
diff --git
a/webcit/static.c
b/webcit/static.c
index 11b868ad5f56578214a9f1da1b0351f6ace2d5a6..145014bc932b821ab315ed88e80811f644f28201 100644
(file)
--- a/
webcit/static.c
+++ b/
webcit/static.c
@@
-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;
}