Unverified Commit 454fa3fd authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

multi: fix location URL memleak in error path

Follow-up to #3044 - fix a leak OSS-Fuzz detected
Closes #3057
parent f8215f80
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -1984,7 +1984,10 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
          else
            follow = FOLLOW_RETRY;
          result = multi_done(&data->easy_conn, CURLE_OK, FALSE);
          if(!result) {
          if(result)
            /* Curl_follow() would otherwise free this */
            free(newurl);
          else {
            result = Curl_follow(data, newurl, follow);
            if(!result) {
              multistate(data, CURLM_STATE_CONNECT);