aboutsummaryrefslogtreecommitdiffstats
path: root/builtin/commit-graph.c
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2023-02-07 00:07:48 +0100
committerJunio C Hamano <gitster@pobox.com>2023-02-06 15:34:39 -0800
commit345e216f63a71ab58f81cf4eae1eb2a458304ca1 (patch)
tree80a178e3484d63c6be382b4f5d8fc02066a56c73 /builtin/commit-graph.c
parentshow-branch: free() allocated "head" before return (diff)
downloadgit-345e216f63a71ab58f81cf4eae1eb2a458304ca1.tar.gz
git-345e216f63a71ab58f81cf4eae1eb2a458304ca1.zip
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-graph.c')
0 files changed, 0 insertions, 0 deletions