pull: fix a "struct oid_array" memory leak

Fix a memory leak introduced in 44c175c7a4 (pull: error on no merge
candidates, 2015-06-18). As a result we can mark several tests as
passing with SANITIZE=leak using "TEST_PASSES_SANITIZE_LEAK=true".

Removing the "int ret = 0" assignment added here in a6d7eb2c7a (pull:
optionally rebase submodules (remote submodule changes only),
2017-06-23) is not a logic error, it could always have been left
uninitialized (as "int ret"), now that we'll use the "ret" from the
upper scope we can drop the assignment in the "opt_rebase" branch.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Ævar Arnfjörð Bjarmason
2022-07-01 12:43:00 +02:00
committed by Junio C Hamano
parent 27472b5195
commit ece3974ba6
4 changed files with 12 additions and 7 deletions

View File

@ -5,7 +5,6 @@
test_description='git svn property tests'
TEST_FAILS_SANITIZE_LEAK=true
. ./lib-git-svn.sh
mkdir import