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
This commit is contained in:
Daniel Stenberg 2018-12-20 16:39:02 +01:00
parent d18a5afaf0
commit fb445a1e18
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
4 changed files with 13 additions and 13 deletions

View file

@ -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. */