summaryrefslogtreecommitdiff
path: root/src/tool_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tool_main.c')
-rw-r--r--src/tool_main.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/tool_main.c b/src/tool_main.c
index 009790493..7bdd253aa 100644
--- a/src/tool_main.c
+++ b/src/tool_main.c
@@ -172,13 +172,17 @@ static CURLcode main_init(struct GlobalConfig *config)
*/
static void main_free(struct GlobalConfig *config)
{
+ /* Cleanup the easy handle */
+ curl_easy_cleanup(config->easy);
+ config->easy = NULL;
+
/* Main cleanup */
curl_global_cleanup();
convert_cleanup();
metalink_cleanup();
/* Free the config structures */
- config_free(config->first);
+ config_free(config->last);
config->first = NULL;
config->last = NULL;
}