tool_main: Fixed a memory leak on main_init error

This commit is contained in:
Dan Fandrich 2014-02-28 21:57:04 +01:00
parent 219d19a401
commit bd248a0b80

View File

@ -154,13 +154,18 @@ static CURLcode main_init(struct GlobalConfig *config)
else {
helpf(stderr, "error initializing curl easy handle\n");
result = CURLE_FAILED_INIT;
free(config->first);
}
}
else
else {
helpf(stderr, "error retrieving curl library information\n");
free(config->first);
}
}
else
else {
helpf(stderr, "error initializing curl library\n");
free(config->first);
}
}
else {
helpf(stderr, "error initializing curl\n");