shortlog: release strbuf after use in insert_one_record()
authorRene Scharfe <l.s.r@web.de>
Wed, 30 Aug 2017 18:00:30 +0000 (20:00 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 6 Sep 2017 23:49:28 +0000 (08:49 +0900)
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/shortlog.c
index 43c4799ea9a9d963f9a44be5cd0ee5bc511e73df..48af16c68141b9ec37755f093376c9e6ba8a4385 100644 (file)
@@ -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);