summaryrefslogtreecommitdiff
path: root/src/cookies.c
diff options
context:
space:
mode:
authorcorvid <corvid@lavabit.com>2013-01-08 22:56:43 +0000
committercorvid <corvid@lavabit.com>2013-01-08 22:56:43 +0000
commit35b754a7c3baa28b29885395ab0a3bbc188fb236 (patch)
treeaea72af65606f8eaee1e6d5757bf15e246a8b29b /src/cookies.c
parent70c06ae5da2ef3f8ad61f3ab5e468055d5e07c2c (diff)
fix an at-least-conceivable fd leak with cookiesrc on error
You can trigger ferror() by putting in a fputc() or the like, but I'm not immediately sure of any good way to trigger it without changing the code...
Diffstat (limited to 'src/cookies.c')
-rw-r--r--src/cookies.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/cookies.c b/src/cookies.c
index 0a1e94ff..e43a74a2 100644
--- a/src/cookies.c
+++ b/src/cookies.c
@@ -260,6 +260,7 @@ static int Cookie_control_init(void)
if (!rc && ferror(stream)) {
MSG("Cookies1: Error while reading rule from cookiesrc: %s\n",
dStrerror(errno));
+ fclose(stream);
return 2; /* bail out */
}