Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
builtin/help.c: fix memory leak
author
Stefan Beller
<sbeller@google.com>
Mon, 9 Mar 2015 16:58:24 +0000
(09:58 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Wed, 11 Mar 2015 03:56:51 +0000
(20:56 -0700)
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/help.c
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
c8a571d
)
diff --git
a/builtin/help.c
b/builtin/help.c
index 6133fe496b00e30a33d03c2d49b22a6ff81f9c77..a1f5a0a097d8ce832987d596bb9e7026f7a0baf1 100644
(file)
--- a/
builtin/help.c
+++ b/
builtin/help.c
@@
-456,7
+456,7
@@
static void list_common_guides_help(void)
int cmd_help(int argc, const char **argv, const char *prefix)
{
int nongit;
- c
onst c
har *alias;
+ char *alias;
enum help_format parsed_help_format;
argc = parse_options(argc, argv, prefix, builtin_help_options,
@@
-499,6
+499,7
@@
int cmd_help(int argc, const char **argv, const char *prefix)
alias = alias_lookup(argv[0]);
if (alias && !is_git_command(argv[0])) {
printf_ln(_("`git %s' is aliased to `%s'"), argv[0], alias);
+ free(alias);
return 0;
}