1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-25 09:38:54 -05:00

ConnectionExists: make sure conn->data is set when "taking" a connection

Follow-up to 2c15693.

Bug #2674
Closes #2675
This commit is contained in:
Daniel Stenberg 2018-06-22 00:13:29 +02:00
parent bc5a0b3e9f
commit 146178a9df
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -1465,6 +1465,7 @@ ConnectionExists(struct Curl_easy *data,
if(chosen) { if(chosen) {
/* mark it as used before releasing the lock */ /* mark it as used before releasing the lock */
chosen->inuse = TRUE; chosen->inuse = TRUE;
chosen->data = data; /* own it! */
Curl_conncache_unlock(needle); Curl_conncache_unlock(needle);
*usethis = chosen; *usethis = chosen;
return TRUE; /* yes, we found one to use! */ return TRUE; /* yes, we found one to use! */