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 {
|
else {
|
||||||
helpf(stderr, "error initializing curl easy handle\n");
|
helpf(stderr, "error initializing curl easy handle\n");
|
||||||
result = CURLE_FAILED_INIT;
|
result = CURLE_FAILED_INIT;
|
||||||
|
free(config->first);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
helpf(stderr, "error retrieving curl library information\n");
|
helpf(stderr, "error retrieving curl library information\n");
|
||||||
|
free(config->first);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
helpf(stderr, "error initializing curl library\n");
|
helpf(stderr, "error initializing curl library\n");
|
||||||
|
free(config->first);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
helpf(stderr, "error initializing curl\n");
|
helpf(stderr, "error initializing curl\n");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user