Restore string after function call.

This commit is contained in:
Steven Schubiger 2009-05-28 23:32:54 +02:00
parent 1df3a35106
commit 766df9d4e9
2 changed files with 7 additions and 0 deletions

View 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"

View File

@ -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);
xfree (lf);
err = ftp_loop_internal (u, NULL, con);
lf = xstrdup (con->target);
xfree (con->target);
con->target = old_target;