mirror of
https://github.com/curl/curl.git
synced 2026-07-22 21:07:18 +03:00
tool_main: Fixed a memory leak on main_init error
This commit is contained in:
parent
219d19a401
commit
bd248a0b80
1 changed files with 7 additions and 2 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue