mirror of
https://github.com/curl/curl.git
synced 2025-02-17 14:59:45 +08:00
tool_main: Fixed a memory leak on main_init error
This commit is contained in:
parent
219d19a401
commit
bd248a0b80
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user