]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Remove one of the frees added in r9916. stat_name points to somewhere
authorSimon Tatham <anakin@pobox.com>
Mon, 29 Jul 2013 17:47:33 +0000 (17:47 +0000)
committerSimon Tatham <anakin@pobox.com>
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.

[originally from svn r9974]
[r9916 == cc4f38df148c84183efce644cd48f822233b962a]

pscp.c

diff --git a/pscp.c b/pscp.c
index 2eecad6dbbfb0e8689a136b5d73efad0af0a5750..6f38a201b24b3e3d9a37fdc4a35a39b4952c9914 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);