summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2021-01-11 10:01:49 +0100
committerDaniel Stenberg <daniel@haxx.se>2021-01-11 10:11:45 +0100
commit28004f5ea32832dc93321a9ff3c10d42a3b8e6e8 (patch)
treecc1c8217685460edf866880184432d633cf7f45b
parent028a35bad76fa564536913152f2587982d1dfc85 (diff)
downloadcurl-bagder/scan-build-fixes.tar.gz
multi: skip DONE state if there's no connection left for ftp wildcardbagder/scan-build-fixes
... to avoid running in that state with data->conn being NULL.
-rw-r--r--lib/multi.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/multi.c b/lib/multi.c
index af4512fd5..9dec278f3 100644
--- a/lib/multi.c
+++ b/lib/multi.c
@@ -1919,7 +1919,10 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
if(wc->state == CURLWC_DONE || wc->state == CURLWC_SKIP) {
/* skip some states if it is important */
multi_done(data, CURLE_OK, FALSE);
- multistate(data, CURLM_STATE_DONE);
+
+ /* if there's no connection left, skip the DONE state */
+ multistate(data, data->conn ?
+ CURLM_STATE_DONE : CURLM_STATE_COMPLETED);
rc = CURLM_CALL_MULTI_PERFORM;
break;
}