1
0
mirror of https://github.com/moparisthebest/curl synced 2024-08-13 17:03:50 -04:00

easy: fix dangling pointer on easy_perform fail

Closes https://github.com/curl/curl/pull/5363
This commit is contained in:
denzor 2020-05-09 17:52:47 +03:00 committed by Jay Satiro
parent b995bb58cb
commit a9021716cc

View File

@ -681,6 +681,7 @@ static CURLcode easy_perform(struct Curl_easy *data, bool events)
mcode = curl_multi_add_handle(multi, data); mcode = curl_multi_add_handle(multi, data);
if(mcode) { if(mcode) {
curl_multi_cleanup(multi); curl_multi_cleanup(multi);
data->multi_easy = NULL;
if(mcode == CURLM_OUT_OF_MEMORY) if(mcode == CURLM_OUT_OF_MEMORY)
return CURLE_OUT_OF_MEMORY; return CURLE_OUT_OF_MEMORY;
return CURLE_FAILED_INIT; return CURLE_FAILED_INIT;