aboutsummaryrefslogtreecommitdiffstats
path: root/builtin/fmt-merge-msg.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-09-05 12:09:34 +0200
committerJunio C Hamano <gitster@pobox.com>2024-09-05 08:49:12 -0700
commit68bd0a94bedf520bc67ca38216e839770f291296 (patch)
tree9ef5b32548c95caf44796f4b895f38f2a6d48fac /builtin/fmt-merge-msg.c
parentbuiltin/grep: fix leaking object context (diff)
downloadgit-68bd0a94bedf520bc67ca38216e839770f291296.tar.gz
git-68bd0a94bedf520bc67ca38216e839770f291296.zip
builtin/fmt-merge-msg: fix leaking buffers
Fix leaking input and output buffers in git-fmt-merge-msg(1). Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/fmt-merge-msg.c')
-rw-r--r--builtin/fmt-merge-msg.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/builtin/fmt-merge-msg.c b/builtin/fmt-merge-msg.c
index 957786d1b3..0b162f8fab 100644
--- a/builtin/fmt-merge-msg.c
+++ b/builtin/fmt-merge-msg.c
@@ -67,6 +67,8 @@ int cmd_fmt_merge_msg(int argc, const char **argv, const char *prefix)
return ret;
write_in_full(STDOUT_FILENO, output.buf, output.len);
+ strbuf_release(&input);
+ strbuf_release(&output);
free(inpath);
return 0;
}