]> sjero.net Git - wget/blobdiff - src/ftp.c
Quote some things that needed quoting.
[wget] / src / ftp.c
index fe6ecd0a9e606d7c4331c7078767f7e483a66ae9..8e05a796bb56b864796412075cd39ecc0fd8b71c 100644 (file)
--- a/src/ftp.c
+++ b/src/ftp.c
@@ -945,7 +945,7 @@ Error in server response, closing control connection.\n"));
       if (dtsock < 0)
         {
           logprintf (LOG_NOTQUIET, "accept: %s\n", strerror (errno));
-          return err;
+          return CONERROR;
         }
     }
 
@@ -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)