aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/transfer.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/transfer.c b/lib/transfer.c
index 0a4e62543..9ce78c552 100644
--- a/lib/transfer.c
+++ b/lib/transfer.c
@@ -2158,8 +2158,10 @@ CURLcode Curl_pretransfersec(struct connectdata *conn)
/* secondary connection */
status = Curl_connect_host(data, &sec_conn);
- sec_conn->data = data;
- conn->sec_conn = sec_conn;
+ if(CURLE_OK == status) {
+ sec_conn->data = data;
+ conn->sec_conn = sec_conn;
+ }
return status;
}