]> granicus.if.org Git - curl/commitdiff
bugfix: don't use the connectindex if it is -1
authorDaniel Stenberg <daniel@haxx.se>
Mon, 12 Mar 2001 09:44:57 +0000 (09:44 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 12 Mar 2001 09:44:57 +0000 (09:44 +0000)
lib/url.c

index 44e2328fb59e6307ad334aa170605810354349f9..c6e19df02ec4713f9024d010e5a35041cdf5f6c3 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -1814,7 +1814,8 @@ CURLcode Curl_connect(struct UrlData *data,
       int index;
       index = conn->connectindex; /* get the index */
       Curl_disconnect(conn);      /* close the connection */
-      data->connects[index]=NULL; /* clear the pointer */
+      if(-1 != index)
+        data->connects[index]=NULL; /* clear the pointer */
     }
   }
   return code;