]> sjero.net Git - wget/commitdiff
Restore string after function call.
authorSteven Schubiger <stsc@member.fsf.org>
Thu, 28 May 2009 21:32:54 +0000 (23:32 +0200)
committerSteven Schubiger <stsc@member.fsf.org>
Thu, 28 May 2009 21:32:54 +0000 (23:32 +0200)
src/ChangeLog
src/ftp.c

index aca389f10e1e39161314e13536d036c0f95ae0d9..cd5f2eee8e8c1aaedb24b2d5c8842642b4cf1b0b 100644 (file)
@@ -1,3 +1,8 @@
+2009-05-28  Steven Schubiger  <stsc@member.fsf.org>
+
+       * ftp.c (ftp_get_listing): Update the "listing file" 
+       string after calling ftp_loop_internal().
+
 2009-05-27  Steven Schubiger  <stsc@member.fsf.org>
 
        * ftp.c (ftp_get_listing): Duplicate the "listing file"
 2009-05-27  Steven Schubiger  <stsc@member.fsf.org>
 
        * ftp.c (ftp_get_listing): Duplicate the "listing file"
index d58d67dfe87ff107ab59ed0b9c65c76f34356bb3..171a38a44325a373f11c91cb659667226450f372 100644 (file)
--- a/src/ftp.c
+++ b/src/ftp.c
@@ -1371,7 +1371,9 @@ ftp_get_listing (struct url *u, ccon *con, struct fileinfo **f)
   DEBUGP ((_("Using %s as listing tmp file.\n"), quote (lf)));
 
   con->target = xstrdup (lf);
   DEBUGP ((_("Using %s as listing tmp file.\n"), quote (lf)));
 
   con->target = xstrdup (lf);
+  xfree (lf);
   err = ftp_loop_internal (u, NULL, con);
   err = ftp_loop_internal (u, NULL, con);
+  lf = xstrdup (con->target);
   xfree (con->target);
   con->target = old_target;
 
   xfree (con->target);
   con->target = old_target;