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()
This commit is contained in:
Junio C Hamano 2017-12-27 11:16:23 -08:00
commit 1f9ce78df0

View File

@ -377,7 +377,8 @@ static void shortlog(const char *name,
string_list_append(&subjects, string_list_append(&subjects,
oid_to_hex(&commit->object.oid)); oid_to_hex(&commit->object.oid));
else else
string_list_append(&subjects, strbuf_detach(&sb, NULL)); string_list_append_nodup(&subjects,
strbuf_detach(&sb, NULL));
} }
if (opts->credit_people) if (opts->credit_people)