Double-free on mkdir error, spotted by Brian Hartsock.
[u/mdw/putty] / psftp.c
diff --git a/psftp.c b/psftp.c
index ba3266b..53b6616 100644 (file)
--- a/psftp.c
+++ b/psftp.c
@@ -1399,7 +1399,6 @@ int sftp_cmd_mkdir(struct sftp_command *cmd)
 
        if (!result) {
            printf("mkdir %s: %s\n", dir, fxp_error());
-           sfree(dir);
            ret = 0;
        } else
            printf("mkdir %s: OK\n", dir);