diff options
author | Daniel Stenberg <daniel@haxx.se> | 2001-08-09 09:47:53 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2001-08-09 09:47:53 +0000 |
commit | f112cc14b9af2a2754ad1bcaa77c65a1ccaa3954 (patch) | |
tree | f693b302384b3f2506820152275a7d6723d8d469 /src | |
parent | 5de39884c3af4251a7215511aa793b1978c51b2f (diff) |
The redirected error stream was closed before curl_easy_cleanup() was made,
and when VERBOSE was enabled, that used the stream. Also, the stream was
closed even if we looped to get more files.
Corrects Dustin Boswell's bug report #441610
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main.c b/src/main.c index 9c59ab3d4..8e3a7a383 100644 --- a/src/main.c +++ b/src/main.c @@ -1963,11 +1963,6 @@ operate(struct Configurable *config, int argc, char *argv[]) fprintf(config->errors, "curl: (%d) %s\n", res, errorbuffer); #endif - if((config->errors != stderr) && - (config->errors != stdout)) - /* it wasn't directed to stdout or stderr so close the file! */ - fclose(config->errors); - if(config->headerfile && !headerfilep && heads.stream) fclose(heads.stream); @@ -2012,6 +2007,11 @@ operate(struct Configurable *config, int argc, char *argv[]) /* cleanup the curl handle! */ curl_easy_cleanup(curl); + if((config->errors != stderr) && + (config->errors != stdout)) + /* it wasn't directed to stdout or stderr so close the file! */ + fclose(config->errors); + main_free(); /* cleanup */ return res; |