Fixed file handle leak in OOM condition.

This commit is contained in:
Dan Fandrich 2007-04-04 22:49:12 +00:00
parent fd016fb3ee
commit 7e74349b86
1 changed files with 1 additions and 0 deletions

View File

@ -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);