aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/easy.c2
-rw-r--r--lib/url.c10
-rw-r--r--lib/urldata.h2
3 files changed, 5 insertions, 9 deletions
diff --git a/lib/easy.c b/lib/easy.c
index e1b74b070..041a831b1 100644
--- a/lib/easy.c
+++ b/lib/easy.c
@@ -812,7 +812,7 @@ CURLcode curl_easy_pause(CURL *curl, int action)
do {
chunklen = (tempsize > CURL_MAX_WRITE_SIZE)?CURL_MAX_WRITE_SIZE:tempsize;
- result = Curl_client_write(data->state.current_conn,
+ result = Curl_client_write(data->easy_conn,
temptype, tempwrite, chunklen);
if(result)
/* failures abort the loop at once */
diff --git a/lib/url.c b/lib/url.c
index bc95c9a29..d2149abd8 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -2605,7 +2605,7 @@ CURLcode Curl_disconnect(struct connectdata *conn, bool dead_connection)
}
conn_free(conn);
- data->state.current_conn = NULL;
+
Curl_speedinit(data);
return CURLE_OK;
@@ -5865,9 +5865,7 @@ CURLcode Curl_do_more(struct connectdata *conn, bool *completed)
void Curl_reset_reqproto(struct connectdata *conn)
{
struct SessionHandle *data = conn->data;
- if(data->state.proto.generic && data->state.current_conn != conn) {
- free(data->state.proto.generic);
- data->state.proto.generic = NULL;
- }
- data->state.current_conn = conn;
+
+ Curl_safefree(data->state.proto.generic);
+ data->state.proto.generic = NULL;
}
diff --git a/lib/urldata.h b/lib/urldata.h
index 43314d9a2..fb4f81c92 100644
--- a/lib/urldata.h
+++ b/lib/urldata.h
@@ -1295,8 +1295,6 @@ struct UrlState {
struct POP3 *pop3;
struct SMTP *smtp;
} proto;
- /* current user of this SessionHandle instance, or NULL */
- struct connectdata *current_conn;
/* if true, force SSL connection retry (workaround for certain servers) */
bool ssl_connect_retry;