]> granicus.if.org Git - curl/commitdiff
ConnectionExists: make sure conn->data is set when "taking" a connection
authorDaniel Stenberg <daniel@haxx.se>
Thu, 21 Jun 2018 22:13:29 +0000 (00:13 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 22 Jun 2018 15:00:22 +0000 (17:00 +0200)
Follow-up to 2c15693.

Bug #2674
Closes #2675

lib/url.c

index 0cab0a303dd206eaaae9004ec708a7b9eed57cb8..f1a6e8db48db0629eb2822bca93cced63795af1c 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -1465,6 +1465,7 @@ ConnectionExists(struct Curl_easy *data,
   if(chosen) {
     /* mark it as used before releasing the lock */
     chosen->inuse = TRUE;
+    chosen->data = data; /* own it! */
     Curl_conncache_unlock(needle);
     *usethis = chosen;
     return TRUE; /* yes, we found one to use! */