aboutsummaryrefslogtreecommitdiff
path: root/lib/url.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2001-03-12 09:44:57 +0000
committerDaniel Stenberg <daniel@haxx.se>2001-03-12 09:44:57 +0000
commit8eb8a0a8e4ee854f063d589fc97bfbf89836a5dd (patch)
treef01aac5254f3ffc776c07ce02b69192de0dfc8f0 /lib/url.c
parenta4af638867a984ae748e33ed204f9486f5430abf (diff)
bugfix: don't use the connectindex if it is -1
Diffstat (limited to 'lib/url.c')
-rw-r--r--lib/url.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/url.c b/lib/url.c
index 44e2328fb..c6e19df02 100644
--- 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;