1
0
mirror of https://github.com/moparisthebest/wget synced 2024-07-03 16:38:41 -04:00

Fix memory leak.

This commit is contained in:
Tim Ruehsen 2012-04-21 12:08:45 +02:00 committed by Giuseppe Scrivano
parent fd582e4543
commit f1d4aeaffb
2 changed files with 12 additions and 2 deletions

View File

@ -1,3 +1,7 @@
2012-04-21 Tim Ruehsen <tim.ruehsen@gmx.de>
* ftp-basic.c (ftp_pasv): Fix memory leak.
2009-06-14 Phil Pennock <mutt-dev@spodhuis.org> (tiny change)
* host.h: Declare `is_valid_ip_address'.
* host.c (is_valid_ip_address): New function.

View File

@ -524,7 +524,10 @@ ftp_pasv (int csock, ip_address *addr, int *port)
for (s += 4; *s && !c_isdigit (*s); s++)
;
if (!*s)
{
xfree (respline);
return FTPINVPASV;
}
for (i = 0; i < 6; i++)
{
tmp[i] = 0;
@ -593,7 +596,10 @@ ftp_lpsv (int csock, ip_address *addr, int *port)
for (s += 4; *s && !c_isdigit (*s); s++)
;
if (!*s)
{
xfree (respline);
return FTPINVPASV;
}
/* First, get the address family */
af = 0;