Remove one of the frees added in r9916. stat_name points to somewhere
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Mon, 29 Jul 2013 17:47:33 +0000 (17:47 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Mon, 29 Jul 2013 17:47:33 +0000 (17:47 +0000)
within the same string that destfname points to the start of, so
freeing it causes at best a double-free of destfname and more likely a
free of something that isn't even the start of an allocated block.

git-svn-id: svn://svn.tartarus.org/sgt/putty@9974 cda61777-01e9-0310-a592-d414129be87e

pscp.c

diff --git a/pscp.c b/pscp.c
index 2eecad6..6f38a20 100644 (file)
--- a/pscp.c
+++ b/pscp.c
@@ -2026,7 +2026,6 @@ static void sink(char *targ, char *src)
            set_file_times(f, act.mtime, act.atime);
        }
 
-       sfree(stat_name);
        close_wfile(f);
        if (wrerror) {
            run_err("%s: Write error", destfname);