]> git.ipfire.org Git - thirdparty/git.git/commit
builtin/branch: fix leaking sorting options
authorPatrick Steinhardt <ps@pks.im>
Wed, 20 Nov 2024 13:39:48 +0000 (14:39 +0100)
committerJunio C Hamano <gitster@pobox.com>
Wed, 20 Nov 2024 23:23:45 +0000 (08:23 +0900)
commitb97301c13c758f168019129fc888e6492c046752
treede175b3f718723c29540f67570aee280a8d1e113
parent8ef15c205b5ecf56c7e0e9bd6d53999c1ad10f89
builtin/branch: fix leaking sorting options

The sorting options are leaking, but given that they are marked with
`UNLEAK()` the leak sanitizer doesn't complain.

Fix the leak by creating a common exit path and clearing the vector such
that we can get rid of the `UNLEAK()` annotation entirely.

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