diff options
-rw-r--r-- | lib/cookie.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/cookie.c b/lib/cookie.c index 1668f0276..732ba9b83 100644 --- a/lib/cookie.c +++ b/lib/cookie.c @@ -1504,10 +1504,9 @@ static int cookie_output(struct CookieInfo *c, const char *dumphere) format_ptr = get_netscape_format(array[i]); if(format_ptr == NULL) { fprintf(out, "#\n# Fatal libcurl error\n"); - if(!use_stdout) { - free(array); + free(array); + if(!use_stdout) fclose(out); - } return 1; } fprintf(out, "%s\n", format_ptr); |