From 557d3185ee22ec44bb6965467b14a76d9c33e571 Mon Sep 17 00:00:00 2001 From: Rene Scharfe Date: Wed, 30 Aug 2017 20:00:30 +0200 Subject: [PATCH] shortlog: release strbuf after use in insert_one_record() Signed-off-by: Rene Scharfe Signed-off-by: Junio C Hamano --- builtin/shortlog.c | 1 + 1 file changed, 1 insertion(+) 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); -- 2.47.1