]> git.ipfire.org Git - thirdparty/git.git/commit - builtin/pull.c
pull: fix a "struct oid_array" memory leak
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Fri, 1 Jul 2022 10:43:00 +0000 (12:43 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 1 Jul 2022 18:43:43 +0000 (11:43 -0700)
commitece3974ba6018416ad4184c540f85d9db9b060b5
tree6f696645ab19217251e6bdb11d4b31fb0779e860
parent27472b5195e3e8e888be0fdc3a7a22687cd808fe
pull: fix a "struct oid_array" memory leak

Fix a memory leak introduced in 44c175c7a46 (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 a6d7eb2c7a6 (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>
builtin/pull.c
t/t5524-pull-msg.sh
t/t6417-merge-ours-theirs.sh
t/t9101-git-svn-props.sh