Skip to content

Commit 1f9ce78

Browse files
committed
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()
2 parents 5c14bd6 + addcf6c commit 1f9ce78

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

builtin/fmt-merge-msg.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,8 @@ static void shortlog(const char *name,
377377
string_list_append(&subjects,
378378
oid_to_hex(&commit->object.oid));
379379
else
380-
string_list_append(&subjects, strbuf_detach(&sb, NULL));
380+
string_list_append_nodup(&subjects,
381+
strbuf_detach(&sb, NULL));
381382
}
382383

383384
if (opts->credit_people)

0 commit comments

Comments
 (0)