From 766df9d4e9392045a4e5c730ed81e599b509557a Mon Sep 17 00:00:00 2001 From: Steven Schubiger Date: Thu, 28 May 2009 23:32:54 +0200 Subject: [PATCH] Restore string after function call. --- src/ChangeLog | 5 +++++ src/ftp.c | 2 ++ 2 files changed, 7 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index aca389f1..cd5f2eee 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2009-05-28 Steven Schubiger + + * ftp.c (ftp_get_listing): Update the "listing file" + string after calling ftp_loop_internal(). + 2009-05-27 Steven Schubiger * ftp.c (ftp_get_listing): Duplicate the "listing file" diff --git a/src/ftp.c b/src/ftp.c index d58d67df..171a38a4 100644 --- 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); + xfree (lf); err = ftp_loop_internal (u, NULL, con); + lf = xstrdup (con->target); xfree (con->target); con->target = old_target; -- 2.39.2