diff options
author | Javier Blazquez <jblazquez@riotgames.com> | 2018-06-22 20:11:26 -0700 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2018-06-23 22:31:52 +0200 |
commit | 4c901638b4d7bab5e5a847f6970425d9c1f2ea2d (patch) | |
tree | 3f8374daaa298195a6e15ea0ce373ece0feac3d1 /lib | |
parent | 146178a9df83de1cfc345771b4c6eceb21ea700e (diff) |
multi: fix crash due to dangling entry in connect-pending list
Fixes #2677
Closes #2679
Diffstat (limited to 'lib')
-rw-r--r-- | lib/multi.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/multi.c b/lib/multi.c index e30737dd2..c1d48a3ed 100644 --- a/lib/multi.c +++ b/lib/multi.c @@ -712,6 +712,11 @@ CURLMcode curl_multi_remove_handle(struct Curl_multi *multi, Curl_getoff_all_pipelines(data, data->easy_conn); } + if(data->connect_queue.ptr) + /* the handle was in the pending list waiting for an available connection, + so go ahead and remove it */ + Curl_llist_remove(&multi->pending, &data->connect_queue, NULL); + if(data->dns.hostcachetype == HCACHE_MULTI) { /* stop using the multi handle's DNS cache, *after* the possible multi_done() call above */ |