aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2007-10-25 09:41:35 +0000
committerDaniel Stenberg <daniel@haxx.se>2007-10-25 09:41:35 +0000
commitca67dcbc055bb1a017e9d215859362348dbbcbaa (patch)
tree95de87b15803383008c87d560c08f7b2a3ec48d5
parent9dbc2c827d3620c2e6469c7adc5aa35c79514fa1 (diff)
Don't assume there's a sessionhandle around when a connection is disconnected,
so do the data->reqdata.current_conn assignment when we know there is an easy handle existing! Fixes the valgrind report on test 509.
-rw-r--r--lib/url.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/url.c b/lib/url.c
index 9d6be5315..c87eeaa81 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -2058,9 +2058,6 @@ static void conn_free(struct connectdata *conn)
if(CURL_SOCKET_BAD != conn->sock[FIRSTSOCKET])
sclose(conn->sock[FIRSTSOCKET]);
- if (conn->data->reqdata.current_conn == conn) {
- conn->data->reqdata.current_conn = NULL;
- }
Curl_safefree(conn->user);
Curl_safefree(conn->passwd);
Curl_safefree(conn->proxyuser);
@@ -2170,6 +2167,7 @@ CURLcode Curl_disconnect(struct connectdata *conn)
}
conn_free(conn);
+ data->reqdata.current_conn = NULL;
return CURLE_OK;
}