From: Dan Fandrich Date: Wed, 4 Apr 2007 22:49:12 +0000 (+0000) Subject: Fixed file handle leak in OOM condition. X-Git-Tag: curl-7_16_2~28 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7e74349b86386f0fb33e7323f70b10300d64eaf3;p=thirdparty%2Fcurl.git Fixed file handle leak in OOM condition. --- diff --git a/lib/cookie.c b/lib/cookie.c index 4a33845ab7..e64bc49e9c 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);