bugfix: don't use the connectindex if it is -1

This commit is contained in:
Daniel Stenberg 2001-03-12 09:44:57 +00:00
parent a4af638867
commit 8eb8a0a8e4
1 changed files with 2 additions and 1 deletions

View File

@ -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;