summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2019-06-09 18:31:42 +0200
committerDaniel Stenberg <daniel@haxx.se>2019-06-09 18:31:42 +0200
commit658ebabf5ec177fbad492ab2aa2c38a4b1d43cdd (patch)
tree0a90c5e3a3953724fa4bf6c62e91dbe9cf5e80ce
parentd2010b2aa5444636808ba6c9b704daff0de9276c (diff)
downloadcurl-badger/multi-sockhash-lists.tar.gz
fixup don't destroy the transfer list in sh_delentrybadger/multi-sockhash-lists
... since it brings back the problem wiht a parent function traversing that list when it gets nuked.
-rw-r--r--lib/multi.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/lib/multi.c b/lib/multi.c
index d169a08dc..bd20cd660 100644
--- a/lib/multi.c
+++ b/lib/multi.c
@@ -253,14 +253,8 @@ static struct Curl_sh_entry *sh_addentry(struct curl_hash *sh,
if(there) {
/* it is present, return fine */
- if(there->removed) {
+ if(there->removed)
there->removed = FALSE; /* clear the removed bit */
- /* init the transfer hash */
- if(Curl_hash_init(&there->transfers, TRHASH_SIZE, trhash,
- trhash_compare, trhash_dtor)) {
- return NULL;
- }
- }
return there;
}
@@ -289,13 +283,13 @@ static struct Curl_sh_entry *sh_addentry(struct curl_hash *sh,
static void sh_delentry(struct Curl_sh_entry *entry,
struct curl_hash *sh, curl_socket_t s)
{
- Curl_hash_destroy(&entry->transfers);
-
if(entry->blocked) {
entry->removed = TRUE; /* pretend */
return;
}
else {
+ Curl_hash_destroy(&entry->transfers);
+
/* We remove the hash entry. This will end up in a call to
sh_freeentry(). */
Curl_hash_delete(sh, (char *)&s, sizeof(curl_socket_t));