summaryrefslogtreecommitdiffstats
path: root/t/t6011-rev-list-with-bad-commit.sh
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/t6011-rev-list-with-bad-commit.sh
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/t6011-rev-list-with-bad-commit.sh')
-rwxr-xr-xt/t6011-rev-list-with-bad-commit.sh1
1 files changed, 1 insertions, 0 deletions
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: