diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/cookie.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/cookie.c b/lib/cookie.c index b117f2f8b..4db1a5621 100644 --- a/lib/cookie.c +++ b/lib/cookie.c @@ -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); |