aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/ftp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/ftp.c b/lib/ftp.c
index a8ae4cb40..65f3dfa86 100644
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -1005,6 +1005,10 @@ CURLcode _ftp(struct connectdata *conn)
freeaddrinfo(res);
return CURLE_FTP_PORT_FAILED;
}
+ /* we set the secondary socket variable to this for now, it
+ is only so that the cleanup function will close it in case
+ we fail before the true secondary stuff is made */
+ conn->secondarysocket = portsock;
#else
struct sockaddr_in sa;