]> git.ipfire.org Git - thirdparty/git.git/commit
sequencer: release todo list on error paths
authorPatrick Steinhardt <ps@pks.im>
Wed, 14 Aug 2024 06:52:36 +0000 (08:52 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 14 Aug 2024 17:08:00 +0000 (10:08 -0700)
commit2f07d228c3a1c623526ddf38e609dc45c98fb22e
tree5a42e332ecdadb3c43471281e34be2a303ec31a1
parentde54b450a3275e98858bf7e83475ad2465cce073
sequencer: release todo list on error paths

We're not releasing the `todo_list` in `sequencer_pick_revisions()` when
hitting an error path. Restructure the function to have a common exit
path such that we can easily clean up the list and thus plug this memory
leak.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
sequencer.c
t/t3510-cherry-pick-sequence.sh