mirror of
https://github.com/curl/curl.git
synced 2026-07-24 20:57:18 +03:00
- Pawel Kierski pointed out a mistake in the cookie code that could lead to a
bad fclose() after a fatal error had occured. (http://curl.haxx.se/bug/view.cgi?id=2382219)
This commit is contained in:
parent
04ee89493e
commit
58ebde9502
3 changed files with 9 additions and 2 deletions
|
|
@ -1003,7 +1003,8 @@ int Curl_cookie_output(struct CookieInfo *c, const char *dumphere)
|
|||
format_ptr = get_netscape_format(co);
|
||||
if(format_ptr == NULL) {
|
||||
fprintf(out, "#\n# Fatal libcurl error\n");
|
||||
fclose(out);
|
||||
if(!use_stdout)
|
||||
fclose(out);
|
||||
return 1;
|
||||
}
|
||||
fprintf(out, "%s\n", format_ptr);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue