]> git.ipfire.org Git - thirdparty/git.git/commit
git: fix leaking system paths
authorPatrick Steinhardt <ps@pks.im>
Wed, 14 Aug 2024 06:51:55 +0000 (08:51 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 14 Aug 2024 17:07:56 +0000 (10:07 -0700)
commitce15f9eb9eb9e7ac3d5095b19cd7b8c7c5bfc22b
tree6a7fbb4e2c05084863233c04e0bb688118333e9b
parentce01f92889a9398b5170bf7e28425c94173cfe06
git: fix leaking system paths

Git has some flags to make it output system paths as they have been
compiled into Git. This is done by calling `system_path()`, which
returns an allocated string. This string isn't ever free'd though,
creating a memory leak.

Plug those leaks. While they are surfaced by t0211, there are more
memory leaks looming exposed by that test suite and it thus does not yet
pass with the memory leak checker enabled.

Helped-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git.c