]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
in Curl_disonnect(): call the protocol-specific disconnect function before we
authorDaniel Stenberg <daniel@haxx.se>
Mon, 1 Mar 2004 07:19:26 +0000 (07:19 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 1 Mar 2004 07:19:26 +0000 (07:19 +0000)
unlink the "current" connection struct from the connection cache.

lib/url.c

index 78c25aebc7c782bf71b5807f3a29cb9d9a47ca9e..e9dc7a02b22cc2a3d24f278703f8c81c37c2a4ce 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -1325,16 +1325,16 @@ CURLcode Curl_disconnect(struct connectdata *conn)
        we shall forget. */
     conn->data->state.authstage = 0;
 
+  if(conn->curl_disconnect)
+    /* This is set if protocol-specific cleanups should be made */
+    conn->curl_disconnect(conn);
+
   if(-1 != conn->connectindex) {
     /* unlink ourselves! */
     infof(conn->data, "Closing connection #%d\n", conn->connectindex);
     conn->data->state.connects[conn->connectindex] = NULL;
   }
 
-  if(conn->curl_disconnect)
-    /* This is set if protocol-specific cleanups should be made */
-    conn->curl_disconnect(conn);
-
   Curl_safefree(conn->proto.generic);
   Curl_safefree(conn->newurl);
   Curl_safefree(conn->path);  /* the URL path part */