From 4c901638b4d7bab5e5a847f6970425d9c1f2ea2d Mon Sep 17 00:00:00 2001 From: Javier Blazquez Date: Fri, 22 Jun 2018 20:11:26 -0700 Subject: multi: fix crash due to dangling entry in connect-pending list Fixes #2677 Closes #2679 --- lib/multi.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib') 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 */ -- cgit v1.2.3