aboutsummaryrefslogtreecommitdiff
path: root/src/tool_main.c
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2014-03-01 13:00:31 +0000
committerSteve Holme <steve_holme@hotmail.com>2014-03-01 13:03:20 +0000
commit5513bbd5c38e5128dd943c28417da29f2c6f9101 (patch)
treea1413ff88a25620d170e84c7c000237bfc0fdb80 /src/tool_main.c
parent1f077181234525832e0fcae38f7ff4f344f4b010 (diff)
tool: Moved --stderr to the global config
Diffstat (limited to 'src/tool_main.c')
-rw-r--r--src/tool_main.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/tool_main.c b/src/tool_main.c
index 1e9156aca..8a613cb21 100644
--- a/src/tool_main.c
+++ b/src/tool_main.c
@@ -132,6 +132,7 @@ static CURLcode main_init(struct GlobalConfig *config)
/* Initialise the global config */
config->showerror = -1; /* Will show errors */
+ config->errors = stderr; /* Default errors to stderr */
/* Allocate the initial operate config */
config->first = config->last = malloc(sizeof(struct OperationConfig));
@@ -179,6 +180,10 @@ static void free_config_fields(struct GlobalConfig *config)
{
Curl_safefree(config->trace_dump);
+ if(config->errors_fopened && config->errors)
+ fclose(config->errors);
+ config->errors = NULL;
+
if(config->trace_fopened && config->trace_stream)
fclose(config->trace_stream);
config->trace_stream = NULL;