transport-helper: release strbuf after use in process_connect_service()
[gitweb.git] / builtin / shortlog.c
index 7cff1839fc15f46d58c9f78361f362d1d790cbd9..48af16c68141b9ec37755f093376c9e6ba8a4385 100644 (file)
@@ -1,5 +1,6 @@
 #include "builtin.h"
 #include "cache.h"
+#include "config.h"
 #include "commit.h"
 #include "diff.h"
 #include "string-list.h"
@@ -71,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);