]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
easy: fix dangling pointer on easy_perform fail
authordenzor <denismikhaylov38@gmail.com>
Sat, 9 May 2020 14:52:47 +0000 (17:52 +0300)
committerJay Satiro <raysatiro@yahoo.com>
Tue, 12 May 2020 07:00:27 +0000 (03:00 -0400)
Closes https://github.com/curl/curl/pull/5363

lib/easy.c

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