aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDan Fandrich <dan@coneharvesters.com>2007-04-04 22:49:12 +0000
committerDan Fandrich <dan@coneharvesters.com>2007-04-04 22:49:12 +0000
commit7e74349b86386f0fb33e7323f70b10300d64eaf3 (patch)
tree5f845ef7da5600ee212018ba48306d43ea9a21b0 /lib
parentfd016fb3ee75aa1e87b1c41ae7b05e163f65b351 (diff)
Fixed file handle leak in OOM condition.
Diffstat (limited to 'lib')
-rw-r--r--lib/cookie.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/cookie.c b/lib/cookie.c
index 4a33845ab..e64bc49e9 100644
--- a/lib/cookie.c
+++ b/lib/cookie.c
@@ -972,6 +972,7 @@ int Curl_cookie_output(struct CookieInfo *c, char *dumphere)
format_ptr = get_netscape_format(co);
if (format_ptr == NULL) {
fprintf(out, "#\n# Fatal libcurl error\n");
+ fclose(out);
return 1;
}
fprintf(out, "%s\n", format_ptr);