diff options
author | xquery <jim@webcomposite.com> | 2020-06-08 13:25:56 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2020-06-08 16:14:07 +0200 |
commit | 0a35580e210df6a0548c114665f201ecd759eadd (patch) | |
tree | 54cdf4bba399fa8783b1d68693d4ee5158ccf71b | |
parent | 54d3769761e5a842aefa9462cd0eaed00da400d0 (diff) |
multi: add defensive check on data->multi->num_alive
Closes #5540
-rw-r--r-- | lib/multi.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/multi.c b/lib/multi.c index a614929ec..d20b33dbc 100644 --- a/lib/multi.c +++ b/lib/multi.c @@ -168,9 +168,11 @@ static void mstate(struct Curl_easy *data, CURLMstate state } #endif - if(state == CURLM_STATE_COMPLETED) + if(state == CURLM_STATE_COMPLETED) { /* changing to COMPLETED means there's one less easy handle 'alive' */ + DEBUGASSERT(data->multi->num_alive > 0); data->multi->num_alive--; + } /* if this state has an init-function, run it */ if(finit[state]) |