diff options
author | Stefan Beller <stefanbeller@googlemail.com> | 2013-07-14 23:35:47 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-07-15 09:45:21 -0700 |
commit | 70a0cc9e5c62f7b8ce0acc693e10a9e080f187ef (patch) | |
tree | e6c6b10460565a844596189d8a83cace4c641d78 /builtin/commit.c | |
parent | daemon.c:handle: Remove unneeded check for null pointer. (diff) | |
download | tgif-70a0cc9e5c62f7b8ce0acc693e10a9e080f187ef.tar.xz |
commit: Fix a memory leak in determine_author_info
The date variable is assigned new memory via xmemdupz and 2 lines later
it is assigned new memory again via xmalloc, but the first assignment
is never freed nor used.
Signed-off-by: Stefan Beller <stefanbeller@googlemail.com>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/commit.c')
-rw-r--r-- | builtin/commit.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/builtin/commit.c b/builtin/commit.c index d21d07a1a8..0575ad8ecd 100644 --- a/builtin/commit.c +++ b/builtin/commit.c @@ -526,7 +526,6 @@ static void determine_author_info(struct strbuf *author_ident) (lb - strlen(" ") - (a + strlen("\nauthor ")))); email = xmemdupz(lb + strlen("<"), rb - (lb + strlen("<"))); - date = xmemdupz(rb + strlen("> "), eol - (rb + strlen("> "))); len = eol - (rb + strlen("> ")); date = xmalloc(len + 2); *date = '@'; |