]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Remove rogue sfree()s inside new wildcard action functions -- were causing
authorJacob Nevins <jacobn@chiark.greenend.org.uk>
Sat, 1 Jan 2005 14:06:12 +0000 (14:06 +0000)
committerJacob Nevins <jacobn@chiark.greenend.org.uk>
Sat, 1 Jan 2005 14:06:12 +0000 (14:06 +0000)
segfaults in failure cases.

[originally from svn r5057]

psftp.c

diff --git a/psftp.c b/psftp.c
index 48c12a4e3330b006a10e9908fb6801ebdef3bb5b..71a8f274aa320b4b8dcbc3f9c9fb3e46ac2a7f85 100644 (file)
--- a/psftp.c
+++ b/psftp.c
@@ -1457,7 +1457,6 @@ static int sftp_action_rm(void *vctx, char *fname)
 
     if (!result) {
        printf("rm %s: %s\n", fname, fxp_error());
-       sfree(fname);
        return 0;
     }
 
@@ -1624,7 +1623,6 @@ static int sftp_action_chmod(void *vctx, char *fname)
     if (!result || !(attrs.flags & SSH_FILEXFER_ATTR_PERMISSIONS)) {
        printf("get attrs for %s: %s\n", fname,
               result ? "file permissions not provided" : fxp_error());
-       sfree(fname);
        return 0;
     }
 
@@ -1644,7 +1642,6 @@ static int sftp_action_chmod(void *vctx, char *fname)
 
     if (!result) {
        printf("set attrs for %s: %s\n", fname, fxp_error());
-       sfree(fname);
        return 0;
     }