summaryrefslogtreecommitdiff
path: root/src/tool_cfgable.c
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2014-02-09 17:16:15 +0000
committerSteve Holme <steve_holme@hotmail.com>2014-02-09 17:16:15 +0000
commit86a40f5d1ad7a0ccb8522137d626551d2e36cd52 (patch)
treef7ee3e5e336a6ae6f392c39d86ed90e39c1cd718 /src/tool_cfgable.c
parentae363075e6219f3cb198447d42a6b696f427ff14 (diff)
downloadcurl-86a40f5d1ad7a0ccb8522137d626551d2e36cd52.tar.gz
tool_operate: Move the trace and error file closure to tool_cfgable
Diffstat (limited to 'src/tool_cfgable.c')
-rw-r--r--src/tool_cfgable.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/tool_cfgable.c b/src/tool_cfgable.c
index aed96a48b..3ea73dabd 100644
--- a/src/tool_cfgable.c
+++ b/src/tool_cfgable.c
@@ -121,11 +121,15 @@ static void free_config_fields(struct Configurable *config)
Curl_safefree(config->xoauth2_bearer);
- config->trace_stream = NULL; /* closed elsewhere when appropriate */
+ if(config->trace_fopened && config->trace_stream)
+ fclose(config->trace_stream);
+ config->trace_stream = NULL;
Curl_safefree(config->writeout);
- config->errors = NULL; /* closed elsewhere when appropriate */
+ if(config->errors_fopened && config->errors)
+ fclose(config->errors);
+ config->errors = NULL;
curl_slist_free_all(config->quote);
curl_slist_free_all(config->postquote);