]> git.ipfire.org Git - thirdparty/git.git/commit
submodule: fix leaking memory for submodule entries
authorPatrick Steinhardt <ps@pks.im>
Mon, 27 May 2024 11:46:59 +0000 (13:46 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 27 May 2024 18:20:01 +0000 (11:20 -0700)
commit3ef52dd1125b6c9223fd03aca146f6b799e014f9
treecfb8ddec6bee9db44e00ce58c55454202a827fdc
parentba9d029445e183d7c7dda75887cee1b5d6fee1d7
submodule: fix leaking memory for submodule entries

In `free_one_config()` we never end up freeing the `url` and `ignore`
fields and thus leak memory. Fix those leaks and mark now-passing tests
as leak free.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
submodule-config.c
t/t1013-read-tree-submodule.sh
t/t2013-checkout-submodule.sh
t/t3007-ls-files-recurse-submodules.sh
t/t7112-reset-submodule.sh