diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-12-27 11:16:23 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-12-27 11:16:23 -0800 |
commit | 1f9ce78df08120f6a67107ccbc6b1c4658cd1808 (patch) | |
tree | 03d6a9d84bcbf8a6e94a50466f762aa6f561db59 /builtin/fmt-merge-msg.c | |
parent | 5c14bd6175531a31b35f62ff8f1619eff38b06d1 (diff) | |
parent | addcf6cfdeb24a2ae589cbdd0ac1e754310b9ca8 (diff) | |
download | git-1f9ce78df08120f6a67107ccbc6b1c4658cd1808.tar.gz |
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/fmt-merge-msg.c')
-rw-r--r-- | builtin/fmt-merge-msg.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/fmt-merge-msg.c b/builtin/fmt-merge-msg.c index 22034f87e7..8e8a15ea4a 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) |