From c4acc08c32861f9ea668b7833534b269284c29f4 Mon Sep 17 00:00:00 2001 From: simon Date: Sat, 1 Jan 2005 13:01:13 +0000 Subject: [PATCH] There's always one: fix small memory leak introduced in last revision. git-svn-id: svn://svn.tartarus.org/sgt/putty@5056 cda61777-01e9-0310-a592-d414129be87e --- psftp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/psftp.c b/psftp.c index 508ab8cd..48c12a4e 100644 --- a/psftp.c +++ b/psftp.c @@ -1588,6 +1588,7 @@ int sftp_cmd_mv(struct sftp_command *cmd) if ((cmd->nwords > 3 || is_wildcard(cmd->words[1])) && !ctx->dest_is_dir) { printf("mv: multiple or wildcard arguments require the destination" " to be a directory\n"); + sfree(ctx->dstfname); return 0; } @@ -1598,6 +1599,7 @@ int sftp_cmd_mv(struct sftp_command *cmd) for (i = 1; i < cmd->nwords-1; i++) ret &= wildcard_iterate(cmd->words[i], sftp_action_mv, ctx); + sfree(ctx->dstfname); return ret; } -- 2.11.0