]> git.ipfire.org Git - thirdparty/git.git/commit
bisect: fix multiple leaks in `bisect_next_all()`
authorPatrick Steinhardt <ps@pks.im>
Wed, 20 Nov 2024 13:39:34 +0000 (14:39 +0100)
committerJunio C Hamano <gitster@pobox.com>
Wed, 20 Nov 2024 23:23:41 +0000 (08:23 +0900)
commitcfb8a0da55fec9619e4e5b1e9b211ef85e3c9cb3
tree2ee19b327de346097fb695287215f4e94ee4a2cd
parenta13d4a19d2b260e27b262292f07f5f315f04e07d
bisect: fix multiple leaks in `bisect_next_all()`

There are multiple leaks in `bisect_next_all()`. For one we don't free
the `tried` commit list. Second, one of the branches uses a direct
return instead of jumping to the cleanup code.

Fix these by freeing the commit list and converting the return to a
goto.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
bisect.c