summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRene Scharfe <l.s.r@web.de>2017-08-30 20:00:30 +0200
committerJunio C Hamano <gitster@pobox.com>2017-09-07 08:49:28 +0900
commit557d3185ee22ec44bb6965467b14a76d9c33e571 (patch)
treedb5c48ec52c92befcd0b8678fd4ff99aad7e2f8f
parentea8e029785f87dc167491ebbc7ea3e924a72b5c4 (diff)
downloadgit-557d3185ee22ec44bb6965467b14a76d9c33e571.tar.gz
shortlog: release strbuf after use in insert_one_record()
Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--builtin/shortlog.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/builtin/shortlog.c b/builtin/shortlog.c
index 43c4799ea9..48af16c681 100644
--- a/builtin/shortlog.c
+++ b/builtin/shortlog.c
@@ -72,6 +72,7 @@ static void insert_one_record(struct shortlog *log,
strbuf_addf(&namemailbuf, " <%.*s>", (int)maillen, mailbuf);
item = string_list_insert(&log->list, namemailbuf.buf);
+ strbuf_release(&namemailbuf);
if (log->summary)
item->util = (void *)(UTIL_TO_INT(item) + 1);