From f3ce38739fa49008e36959aa8189c01ab1bad5b5 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sun, 23 Dec 2018 17:38:59 +0100 Subject: disconnect: set conn->data for protocol disconnect Follow-up to fb445a1e18d: Set conn->data explicitly to point out the current transfer when invoking the protocol-specific disconnect function so that it can work correctly. Bug: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=12173 --- lib/url.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/url.c b/lib/url.c index 50719ce54..bf92016d0 100644 --- a/lib/url.c +++ b/lib/url.c @@ -781,6 +781,9 @@ CURLcode Curl_disconnect(struct Curl_easy *data, Curl_http_ntlm_cleanup(conn); #endif + /* the protocol specific disconnect handler needs a transfer for its + connection! */ + conn->data = data; if(conn->handler->disconnect) /* This is set if protocol-specific cleanups should be made */ conn->handler->disconnect(conn, dead_connection); -- cgit v1.2.3