From fb445a1e18d12f577964c9347bc5bca74b37cd08 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 20 Dec 2018 16:39:02 +0100 Subject: disconnect: separate connections and easy handles better Do not assume/store assocation between a given easy handle and the connection if it can be avoided. Long-term, the 'conn->data' pointer should probably be removed as it is a little too error-prone. Still used very widely though. Reported-by: masbug on github Fixes #3391 Closes #3400 --- lib/multi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'lib/multi.c') diff --git a/lib/multi.c b/lib/multi.c index 56b3faf2f..d8121250c 100644 --- a/lib/multi.c +++ b/lib/multi.c @@ -761,10 +761,8 @@ CURLMcode curl_multi_remove_handle(struct Curl_multi *multi, vanish with this handle */ /* Remove the association between the connection and the handle */ - if(data->easy_conn) { - data->easy_conn->data = NULL; + if(data->easy_conn) data->easy_conn = NULL; - } #ifdef USE_LIBPSL /* Remove the PSL association. */ -- cgit v1.2.3