tool: Moved --stderr to the global config

This commit is contained in:
Steve Holme 2014-03-01 13:00:31 +00:00
parent 1f07718123
commit 5513bbd5c3
12 changed files with 69 additions and 68 deletions

View file

@ -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;