assert that the *connp is a non-NULL pointer when Curl_done() is called
authorDaniel Stenberg <daniel@haxx.se>
Thu, 21 Feb 2008 12:28:45 +0000 (12:28 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 21 Feb 2008 12:28:45 +0000 (12:28 +0000)
lib/url.c

index 3c3605c..541c11e 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -4392,8 +4392,13 @@ CURLcode Curl_done(struct connectdata **connp,
                    bool premature)
 {
   CURLcode result;
-  struct connectdata *conn = *connp;
-  struct SessionHandle *data = conn->data;
+  struct connectdata *conn;
+  struct SessionHandle *data;
+
+  DEBUGASSERT(*connp);
+
+  conn = *connp;
+  data = conn->data;
 
   Curl_expire(data, 0); /* stop timer */