summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2018-09-29 11:32:07 +0200
committerDaniel Stenberg <daniel@haxx.se>2018-09-29 15:03:57 +0200
commit2dfc0dd6b59db0816821508418addcf62863c84c (patch)
tree0553744a8a80529e007c29abee8dc055473ac8d0
parent2b3351b8e392cc0bd3d47536f54b6862c9f3dd86 (diff)
downloadcurl-2dfc0dd6b59db0816821508418addcf62863c84c.tar.gz
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
-rw-r--r--lib/multi.c10
1 files changed, 7 insertions, 3 deletions
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)