diff options
author | Daniel Stenberg <daniel@haxx.se> | 2000-12-19 09:06:36 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2000-12-19 09:06:36 +0000 |
commit | 9ee94b3d847f40d228a8c39bd226b161cc2fc671 (patch) | |
tree | 216f101ca434522d8957d988d6412ff11b5e2671 /lib | |
parent | 2c100371d25ab68517192d2b7192764aa133cb4d (diff) |
fixed a leaked file descriptor when PORT failed
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ftp.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -733,6 +733,12 @@ CURLcode _ftp(struct connectdata *conn) if ( h ) { if( (portsock = socket(AF_INET, SOCK_STREAM, 0)) >= 0 ) { + + /* 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 */ + data->secondarysocket = portsock; + memset((char *)&sa, 0, sizeof(sa)); memcpy((char *)&sa.sin_addr, h->h_addr, |