Skip to content

Commit d4592d7

Browse files
committed
Merge branch 'sf/putty-w-args'
Plug a memleak. * sf/putty-w-args: connect.c: fix leak in handle_ssh_variant
2 parents f70b541 + 5d2993b commit d4592d7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

connect.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -738,8 +738,10 @@ static void handle_ssh_variant(const char *ssh_command, int is_cmdline,
738738
* any longer.
739739
*/
740740
free(ssh_argv);
741-
} else
741+
} else {
742+
free(p);
742743
return;
744+
}
743745
}
744746

745747
if (!strcasecmp(variant, "plink") ||

0 commit comments

Comments
 (0)