aboutsummaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-12-27 11:16:23 -0800
committerJunio C Hamano <gitster@pobox.com>2017-12-27 11:16:23 -0800
commit1f9ce78df08120f6a67107ccbc6b1c4658cd1808 (patch)
tree03d6a9d84bcbf8a6e94a50466f762aa6f561db59 /builtin
parent5c14bd6175531a31b35f62ff8f1619eff38b06d1 (diff)
parentaddcf6cfdeb24a2ae589cbdd0ac1e754310b9ca8 (diff)
downloadgit-1f9ce78df08120f6a67107ccbc6b1c4658cd1808.tar.gz
git-1f9ce78df08120f6a67107ccbc6b1c4658cd1808.tar.xz
Merge branch 'rs/fmt-merge-msg-string-leak-fix'
Leakfix. * rs/fmt-merge-msg-string-leak-fix: fmt-merge-msg: avoid leaking strbuf in shortlog()
Diffstat (limited to 'builtin')
-rw-r--r--builtin/fmt-merge-msg.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/fmt-merge-msg.c b/builtin/fmt-merge-msg.c
index 22034f87e..8e8a15ea4 100644
--- a/builtin/fmt-merge-msg.c
+++ b/builtin/fmt-merge-msg.c
@@ -377,7 +377,8 @@ static void shortlog(const char *name,
string_list_append(&subjects,
oid_to_hex(&commit->object.oid));
else
- string_list_append(&subjects, strbuf_detach(&sb, NULL));
+ string_list_append_nodup(&subjects,
+ strbuf_detach(&sb, NULL));
}
if (opts->credit_people)