]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
Alexander Krasnostavsky fixed a flaw in the 3rd party transfer code that
authorDaniel Stenberg <daniel@haxx.se>
Wed, 16 Jun 2004 09:05:22 +0000 (09:05 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 16 Jun 2004 09:05:22 +0000 (09:05 +0000)
didn't properly check return code.

lib/transfer.c

index 0a4e62543834cbaaf35234075ed556288630d3d0..9ce78c552975705a89e0b962b637a4487a094136 100644 (file)
@@ -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;
 }