Unverified Commit f3ce3873 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

disconnect: set conn->data for protocol disconnect

Follow-up to fb445a1e: 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
parent e9ababd4
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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);