diff options
Diffstat (limited to 'src/tool_operhlp.c')
-rw-r--r-- | src/tool_operhlp.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/src/tool_operhlp.c b/src/tool_operhlp.c index f3fcc699f..543bf4302 100644 --- a/src/tool_operhlp.c +++ b/src/tool_operhlp.c @@ -37,18 +37,20 @@ void clean_getout(struct OperationConfig *config) { - struct getout *next; - struct getout *node = config->url_list; - - while(node) { - next = node->next; - Curl_safefree(node->url); - Curl_safefree(node->outfile); - Curl_safefree(node->infile); - Curl_safefree(node); - node = next; + if(config) { + struct getout *next; + struct getout *node = config->url_list; + + while(node) { + next = node->next; + Curl_safefree(node->url); + Curl_safefree(node->outfile); + Curl_safefree(node->infile); + Curl_safefree(node); + node = next; + } + config->url_list = NULL; } - config->url_list = NULL; } bool output_expected(const char *url, const char *uploadfile) |