[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnurl] 68/282: multi_done: if multiplexed, make conn->data point to ano
From: |
gnunet |
Subject: |
[gnurl] 68/282: multi_done: if multiplexed, make conn->data point to another transfer |
Date: |
Wed, 01 Apr 2020 14:28:53 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit db9af34634e36d34067fff506915dcf7a783a1e2
Author: Daniel Stenberg <address@hidden>
AuthorDate: Mon Jan 27 22:50:33 2020 +0100
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
---
lib/multi.c | 3 +++
lib/url.c | 2 ++
2 files changed, 5 insertions(+)
diff --git a/lib/multi.c b/lib/multi.c
index b641074d4..6c9d06b0b 100644
--- a/lib/multi.c
+++ b/lib/multi.c
@@ -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",
diff --git a/lib/url.c b/lib/url.c
index 689668e04..837e62a09 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -1213,6 +1213,8 @@ ConnectionExists(struct Curl_easy *data,
}
}
+ DEBUGASSERT(!check->data || GOOD_EASY_HANDLE(check->data));
+
if(!canmultiplex && check->data)
/* this request can't be multiplexed but the checked connection is
already in use so we skip it */
--
To stop receiving notification emails like this one, please contact
address@hidden.
- [gnurl] 49/282: mk-ca-bundle: add support for CKA_NSS_SERVER_DISTRUST_AFTER, (continued)
- [gnurl] 49/282: mk-ca-bundle: add support for CKA_NSS_SERVER_DISTRUST_AFTER, gnunet, 2020/04/01
- [gnurl] 72/282: ngtcp2: update to git master and its draft-25 support, gnunet, 2020/04/01
- [gnurl] 82/282: curl: avoid using strlen for testing if a string is empty, gnunet, 2020/04/01
- [gnurl] 75/282: quiche: Copyright year out of date, gnunet, 2020/04/01
- [gnurl] 65/282: global_init: move the IPv6 works status bool to multi handle, gnunet, 2020/04/01
- [gnurl] 73/282: quiche: update to draft-25, gnunet, 2020/04/01
- [gnurl] 76/282: ntlm: Move the winbind data into the NTLM data structure, gnunet, 2020/04/01
- [gnurl] 74/282: altsvc: use h3-25, gnunet, 2020/04/01
- [gnurl] 80/282: openssl: remove redundant assignment, gnunet, 2020/04/01
- [gnurl] 83/282: tool_operhlp: Copyright year out of date, should be 2020, gnunet, 2020/04/01
- [gnurl] 68/282: multi_done: if multiplexed, make conn->data point to another transfer,
gnunet <=
- [gnurl] 81/282: ntlm: Ensure the HTTP header data is not stored in the challenge/response, gnunet, 2020/04/01
- [gnurl] 67/282: location.d: the method change is from POST to GET only, gnunet, 2020/04/01
- [gnurl] 84/282: RELEASE-NOTES: synced, gnunet, 2020/04/01
- [gnurl] 86/282: docs/HTTP3: update the OpenSSL branch to use for ngtcp2, gnunet, 2020/04/01
- [gnurl] 66/282: urlapi: guess scheme correct even with credentials given, gnunet, 2020/04/01
- [gnurl] 70/282: KNOWN_BUGS: Multiple methods in a single WWW-Authenticate: header, gnunet, 2020/04/01
- [gnurl] 69/282: oauth2-bearer.d: works for HTTP too, gnunet, 2020/04/01
- [gnurl] 78/282: cirrus: Add some missing semicolons, gnunet, 2020/04/01
- [gnurl] 71/282: cookie: check __Secure- and __Host- case sensitively, gnunet, 2020/04/01
- [gnurl] 79/282: travis: update non-OpenSSL Linux jobs to Bionic, gnunet, 2020/04/01