X-Git-Url: http://sjero.net/git/?p=wget;a=blobdiff_plain;f=src%2Fftp-basic.c;h=045d125e72d9136f955acc86ad0c5e6ca9d73212;hp=836f77e9c5f7dead390459c8ef9a6fdfd41aafe3;hb=eee1589ef3d198a21635d15c9086df2b99f9013d;hpb=542c54998548cddcaeb8c9f43952a4d5a96aaedb diff --git a/src/ftp-basic.c b/src/ftp-basic.c index 836f77e9..045d125e 100644 --- a/src/ftp-basic.c +++ b/src/ftp-basic.c @@ -1,6 +1,7 @@ /* Basic FTP routines. Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, - 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. + 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, + Inc. This file is part of GNU Wget. @@ -36,9 +37,7 @@ as that of the covered work. */ #include #include -#ifdef HAVE_UNISTD_H -# include -#endif +#include #include "utils.h" #include "connect.h" #include "host.h" @@ -525,7 +524,10 @@ ftp_pasv (int csock, ip_address *addr, int *port) for (s += 4; *s && !c_isdigit (*s); s++) ; if (!*s) - return FTPINVPASV; + { + xfree (respline); + return FTPINVPASV; + } for (i = 0; i < 6; i++) { tmp[i] = 0; @@ -594,7 +596,10 @@ ftp_lpsv (int csock, ip_address *addr, int *port) for (s += 4; *s && !c_isdigit (*s); s++) ; if (!*s) - return FTPINVPASV; + { + xfree (respline); + return FTPINVPASV; + } /* First, get the address family */ af = 0;