diff options
author | Dan Fandrich <dan@coneharvesters.com> | 2014-02-28 21:57:04 +0100 |
---|---|---|
committer | Dan Fandrich <dan@coneharvesters.com> | 2014-02-28 21:58:12 +0100 |
commit | bd248a0b8020dde767dca1a46a727c89ae14ee5e (patch) | |
tree | 75abf5a9dc7bbaa72ca8adec5e96a0b08d7fb6b8 /src | |
parent | 219d19a401302fc3f97853d8f7d13b24bf61f5c0 (diff) |
tool_main: Fixed a memory leak on main_init error
Diffstat (limited to 'src')
-rw-r--r-- | src/tool_main.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/tool_main.c b/src/tool_main.c index 955e4795f..1e9156aca 100644 --- a/src/tool_main.c +++ b/src/tool_main.c @@ -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"); |