]> git.ipfire.org Git - thirdparty/git.git/commit
builtin/merge-tree: fix leaking `-X` strategy options
authorPatrick Steinhardt <ps@pks.im>
Thu, 22 Aug 2024 09:17:21 +0000 (11:17 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 22 Aug 2024 16:18:04 +0000 (09:18 -0700)
commitff0935b96e414ff7115f281308c33fb93e4e26ce
tree0bf21a7d3d5ae4f733c75b424a362e5143d7ed20
parent82ea7e59b26644f3e289d105bf85a4109749e4b8
builtin/merge-tree: fix leaking `-X` strategy options

The `-X` switch for git-merge-tree(1) will push each option into a local
`xopts` vector that we then end up parsing. The vector never gets freed
though, causing a memory leak. Plug it.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/merge-tree.c
t/t4301-merge-tree-write-tree.sh