1
0
mirror of https://github.com/moparisthebest/curl synced 2024-11-05 00:55:04 -05:00

multi: add defensive check on data->multi->num_alive

Closes #5540
This commit is contained in:
xquery 2020-06-08 13:25:56 +02:00 committed by Daniel Stenberg
parent 54d3769761
commit 0a35580e21
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -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])