mirror of
https://github.com/curl/curl.git
synced 2024-11-21 01:16:58 +08:00
multi_done: if multiplexed, make conn->data point to another transfer
... since the current transfer is being killed. Setting to NULL is wrong, leaving it pointing to 'data' is wrong since that handle might be about to get freed. Fixes #4845 Closes #4858 Reported-by: dmitrmax on github
This commit is contained in:
parent
8b7fff3311
commit
db9af34634
@ -592,6 +592,9 @@ static CURLcode multi_done(struct Curl_easy *data,
|
||||
detach_connnection(data);
|
||||
if(CONN_INUSE(conn)) {
|
||||
/* Stop if still used. */
|
||||
/* conn->data must not remain pointing to this transfer since it is going
|
||||
away! Find another to own it! */
|
||||
conn->data = conn->easyq.head->ptr;
|
||||
CONN_UNLOCK(data);
|
||||
DEBUGF(infof(data, "Connection still in use %zu, "
|
||||
"no more multi_done now!\n",
|
||||
|
Loading…
Reference in New Issue
Block a user