summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2017-04-26 15:39:10 +0900
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-04-26 15:39:10 +0900
commitd4592d73ef2a4a9cdef528cbd40c3b7660c64b5b (patch)
tree166da1c2a1dd94b59023f55efcc7e9a4cfcc9c67
parentMerge branch 'ab/completion-push-delete-ref' (diff)
parentconnect.c: fix leak in handle_ssh_variant (diff)
downloadtgif-d4592d73ef2a4a9cdef528cbd40c3b7660c64b5b.tar.xz
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 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") ||