Follow-up 465028e0e25 (merge: add missing strbuf_release(), 2021-10-07) and free "&msg" also when we'd "goto done" from the scope it's allocated in. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx> --- builtin/merge.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/builtin/merge.c b/builtin/merge.c index 0f093f2a4f2..8f78f326dbe 100644 --- a/builtin/merge.c +++ b/builtin/merge.c @@ -1577,6 +1577,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix) commit = remoteheads->item; if (!commit) { ret = 1; + strbuf_release(&msg); goto done; } @@ -1589,6 +1590,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix) overwrite_ignore)) { apply_autostash(git_path_merge_autostash(the_repository)); ret = 1; + strbuf_release(&msg); goto done; } -- 2.39.0.1153.gb0033028ca9