aboutsummaryrefslogtreecommitdiff
path: root/src/tool_cfgable.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tool_cfgable.c')
-rw-r--r--src/tool_cfgable.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/tool_cfgable.c b/src/tool_cfgable.c
index e0010a702..2a3c06ffa 100644
--- a/src/tool_cfgable.c
+++ b/src/tool_cfgable.c
@@ -32,7 +32,6 @@ void config_init(struct OperationConfig* config)
config->errors = stderr; /* default errors to stderr */
config->postfieldsize = -1;
- config->showerror = -1; /* will show errors */
config->use_httpget = FALSE;
config->create_dirs = FALSE;
config->maxredirs = DEFAULT_MAXREDIRS;
@@ -154,19 +153,13 @@ void config_free(struct OperationConfig *config)
{
struct OperationConfig *last = config;
- /* Find the last config structure */
- while(last->next)
- last = last->next;
-
/* Free each of the structures in reverse order */
- do {
+ while(last) {
struct OperationConfig *prev = last->prev;
- if(prev)
- last->easy = NULL;
free_config_fields(last);
free(last);
last = prev;
- } while(last);
+ }
}