1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-24 00:58:48 -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 #endif
if(state == CURLM_STATE_COMPLETED) if(state == CURLM_STATE_COMPLETED) {
/* changing to COMPLETED means there's one less easy handle 'alive' */ /* changing to COMPLETED means there's one less easy handle 'alive' */
DEBUGASSERT(data->multi->num_alive > 0);
data->multi->num_alive--; data->multi->num_alive--;
}
/* if this state has an init-function, run it */ /* if this state has an init-function, run it */
if(finit[state]) if(finit[state])