X-Git-Url: http://sjero.net/git/?a=blobdiff_plain;f=src%2Fftp.c;h=171a38a44325a373f11c91cb659667226450f372;hb=766df9d4e9392045a4e5c730ed81e599b509557a;hp=fe6ecd0a9e606d7c4331c7078767f7e483a66ae9;hpb=116b261a9f1ccd945c16e9ad3afc2e85f1fb95b1;p=wget diff --git a/src/ftp.c b/src/ftp.c index fe6ecd0a..171a38a4 100644 --- a/src/ftp.c +++ b/src/ftp.c @@ -1370,8 +1370,11 @@ ftp_get_listing (struct url *u, ccon *con, struct fileinfo **f) xfree (uf); DEBUGP ((_("Using %s as listing tmp file.\n"), quote (lf))); - con->target = 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; if (err == RETROK)