From: Daniel Stenberg Date: Sat, 29 Sep 2018 09:32:07 +0000 (+0200) Subject: multi: fix memory leak in content encoding related error path X-Git-Tag: curl-7_62_0~126 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2dfc0dd6b59db0816821508418addcf62863c84c;p=curl multi: fix memory leak in content encoding related error path ... a missing multi_done() call. Credit to OSS-Fuzz Bug: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10728 Closes #3063 --- diff --git a/lib/multi.c b/lib/multi.c index f20260977..9a98435e6 100644 --- a/lib/multi.c +++ b/lib/multi.c @@ -2005,12 +2005,16 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, newurl = data->req.location; data->req.location = NULL; result = Curl_follow(data, newurl, FOLLOW_FAKE); - if(result) + if(result) { stream_error = TRUE; + result = multi_done(&data->easy_conn, result, TRUE); + } } - multistate(data, CURLM_STATE_DONE); - rc = CURLM_CALL_MULTI_PERFORM; + if(!result) { + multistate(data, CURLM_STATE_DONE); + rc = CURLM_CALL_MULTI_PERFORM; + } } } else if(comeback)