summaryrefslogtreecommitdiff
path: root/connect.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-04-26 15:39:10 +0900
committerJunio C Hamano <gitster@pobox.com>2017-04-26 15:39:10 +0900
commitd4592d73ef2a4a9cdef528cbd40c3b7660c64b5b (patch)
tree166da1c2a1dd94b59023f55efcc7e9a4cfcc9c67 /connect.c
parentf70b54118897ffaa768ac48c9dabec36b293d09a (diff)
parent5d2993b6eabb0e0efdbe17bd43a3bec07a1670be (diff)
downloadgit-d4592d73ef2a4a9cdef528cbd40c3b7660c64b5b.tar.gz
Merge branch 'sf/putty-w-args'
Plug a memleak. * sf/putty-w-args: connect.c: fix leak in handle_ssh_variant
Diffstat (limited to 'connect.c')
-rw-r--r--connect.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/connect.c b/connect.c
index 568a35f754..cd21a1b6f7 100644
--- a/connect.c
+++ b/connect.c
@@ -738,8 +738,10 @@ static void handle_ssh_variant(const char *ssh_command, int is_cmdline,
* any longer.
*/
free(ssh_argv);
- } else
+ } else {
+ free(p);
return;
+ }
}
if (!strcasecmp(variant, "plink") ||