]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
test 119 proved a memory leak in the FTP parts when IPv6 is enabled and the
authorDaniel Stenberg <daniel@haxx.se>
Sun, 23 Sep 2001 12:47:07 +0000 (12:47 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Sun, 23 Sep 2001 12:47:07 +0000 (12:47 +0000)
RETR fails, this corrects it.

lib/ftp.c

index a8ae4cb402886b8078967b69fe77ed0d2da05b9b..65f3dfa8623fb156581baac017c517faa44da913 100644 (file)
--- 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;