Fixed file handle leak in OOM condition.
This commit is contained in:
parent
fd016fb3ee
commit
7e74349b86
@ -972,6 +972,7 @@ int Curl_cookie_output(struct CookieInfo *c, char *dumphere)
|
|||||||
format_ptr = get_netscape_format(co);
|
format_ptr = get_netscape_format(co);
|
||||||
if (format_ptr == NULL) {
|
if (format_ptr == NULL) {
|
||||||
fprintf(out, "#\n# Fatal libcurl error\n");
|
fprintf(out, "#\n# Fatal libcurl error\n");
|
||||||
|
fclose(out);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
fprintf(out, "%s\n", format_ptr);
|
fprintf(out, "%s\n", format_ptr);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user