X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/cb5488c53f54fbdb36ce3f43bbf72d32c002b26a..a607fe54c9f20934b57e29e9040b9dd0a4decf3a:/psftp.c diff --git a/psftp.c b/psftp.c index 5bc7d7c8..322b9c68 100644 --- a/psftp.c +++ b/psftp.c @@ -922,6 +922,7 @@ int wildcard_iterate(char *filename, int (*func)(void *, char *), void *ctx) printf("%s: canonify: %s\n", newname, fxp_error()); ret = 0; } + sfree(newname); matched = TRUE; ret &= func(ctx, cname); sfree(cname); @@ -1034,6 +1035,7 @@ int sftp_cmd_ls(struct sftp_command *cmd) char *tmpdir; int len, check; + sfree(unwcdir); wildcard = stripslashes(dir, 0); unwcdir = dupstr(dir); len = wildcard - dir; @@ -2232,6 +2234,7 @@ struct sftp_command *sftp_getcmd(FILE *fp, int mode, int modeflags) cmd->obey = sftp_cmd_quit; if ((mode == 0) || (modeflags & 1)) printf("quit\n"); + sfree(line); return cmd; /* eof */ }