mirror of
https://github.com/moparisthebest/curl
synced 2024-12-23 16:48:49 -05:00
tool_operate: fix mem leak when failed config parse
Found by fuzzing the config file. Reported-by: Geeknik Labs Fixes https://github.com/curl/curl/issues/4767
This commit is contained in:
parent
060fb84a5a
commit
249f7b37e6
@ -720,8 +720,10 @@ static CURLcode single_transfer(struct GlobalConfig *global,
|
||||
if(SetHTTPrequest(config, HTTPREQ_SIMPLEPOST, &config->httpreq))
|
||||
result = CURLE_FAILED_INIT;
|
||||
}
|
||||
if(result)
|
||||
if(result) {
|
||||
single_transfer_cleanup(config);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
if(!state->urlnode) {
|
||||
/* first time caller, setup things */
|
||||
|
Loading…
Reference in New Issue
Block a user