summaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2023-02-07 00:07:42 +0100
committerJunio C Hamano <gitster@pobox.com>2023-02-07 00:34:37 +0100
commit90428ddccf7bc0c0c192fc973b2d1a7a47605e10 (patch)
tree076e382eb88f819d8d577690ab8f580af5737c4b /t
parentname-rev: don't xstrdup() an already dup'd string (diff)
downloadgit-90428ddccf7bc0c0c192fc973b2d1a7a47605e10.tar.xz
git-90428ddccf7bc0c0c192fc973b2d1a7a47605e10.zip
repack: fix leaks on error with "goto cleanup"
In cmd_repack() when we hit an error, replace "return ret" with "goto cleanup" to ensure we free the necessary data structures. Helped-by: Elijah Newren <newren@gmail.com> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t5312-prune-corruption.sh1
-rwxr-xr-xt/t6011-rev-list-with-bad-commit.sh1
2 files changed, 2 insertions, 0 deletions
diff --git a/t/t5312-prune-corruption.sh b/t/t5312-prune-corruption.sh
index 9d8e249ae8..230cb38712 100755
--- a/t/t5312-prune-corruption.sh
+++ b/t/t5312-prune-corruption.sh
@@ -14,6 +14,7 @@ what currently happens. If that changes, these tests should be revisited.
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
+TEST_PASSES_SANITIZE_LEAK=true
. ./test-lib.sh
test_expect_success 'disable reflogs' '
diff --git a/t/t6011-rev-list-with-bad-commit.sh b/t/t6011-rev-list-with-bad-commit.sh
index bad02cf5b8..b2e422cf0f 100755
--- a/t/t6011-rev-list-with-bad-commit.sh
+++ b/t/t6011-rev-list-with-bad-commit.sh
@@ -2,6 +2,7 @@
test_description='git rev-list should notice bad commits'
+TEST_PASSES_SANITIZE_LEAK=true
. ./test-lib.sh
# Note: