diff options
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2023-02-07 00:07:48 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-02-06 15:34:39 -0800 |
commit | 345e216f63a71ab58f81cf4eae1eb2a458304ca1 (patch) | |
tree | 80a178e3484d63c6be382b4f5d8fc02066a56c73 /builtin/commit-tree.c | |
parent | 81559612a94636f1efe8268385fe6a4ab182ac19 (diff) |
builtin/merge.c: use fixed strings, not "strbuf", fix leak
Follow-up 465028e0e25 (merge: add missing strbuf_release(),
2021-10-07) and address the "msg" memory leak in this block. We could
free "&msg" before the "goto done" here, but even better is to avoid
allocating it in the first place.
By repeating the "Fast-forward" string here we can avoid using a
"struct strbuf" altogether.
Suggested-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/commit-tree.c')
0 files changed, 0 insertions, 0 deletions