summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-04-26 06:39:10 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-04-26 06:39:10 (GMT)
commitd4592d73ef2a4a9cdef528cbd40c3b7660c64b5b (patch)
tree166da1c2a1dd94b59023f55efcc7e9a4cfcc9c67
parentf70b54118897ffaa768ac48c9dabec36b293d09a (diff)
parent5d2993b6eabb0e0efdbe17bd43a3bec07a1670be (diff)
downloadgit-d4592d73ef2a4a9cdef528cbd40c3b7660c64b5b.zip
git-d4592d73ef2a4a9cdef528cbd40c3b7660c64b5b.tar.gz
git-d4592d73ef2a4a9cdef528cbd40c3b7660c64b5b.tar.bz2
Merge branch 'sf/putty-w-args'
Plug a memleak. * sf/putty-w-args: connect.c: fix leak in handle_ssh_variant
-rw-r--r--connect.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/connect.c b/connect.c
index 568a35f..cd21a1b 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") ||