aboutsummaryrefslogtreecommitdiffstats
path: root/t/t1402-check-ref-format.sh
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2022-07-01 12:42:50 +0200
committerJunio C Hamano <gitster@pobox.com>2022-07-01 11:43:42 -0700
commit99b6c45d8f846ed055ba814d985084733d36dabc (patch)
tree2044c931e641d2f64fa2c83aa42a85d94adf3fa4 /t/t1402-check-ref-format.sh
parente4a4b31577c7419497ac30cebe30d755b97752c5 (diff)
downloadgit-99b6c45d8f846ed055ba814d985084733d36dabc.tar.gz
check-ref-format: fix trivial memory leak
Fix a memory leak in "git check-ref-format" that's been present in the code in one form or another since 38eedc634bc (git check-ref-format --print, 2009-10-12), the code got substantially refactored in cfbe22f03f9 (check-ref-format: handle subcommands in separate functions, 2010-08-05). As a result we can mark a test as passing with SANITIZE=leak using "TEST_PASSES_SANITIZE_LEAK=true". Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t1402-check-ref-format.sh')
-rwxr-xr-xt/t1402-check-ref-format.sh1
1 files changed, 1 insertions, 0 deletions
diff --git a/t/t1402-check-ref-format.sh b/t/t1402-check-ref-format.sh
index cabc516ae9..5ed9d7318e 100755
--- a/t/t1402-check-ref-format.sh
+++ b/t/t1402-check-ref-format.sh
@@ -2,6 +2,7 @@
test_description='Test git check-ref-format'
+TEST_PASSES_SANITIZE_LEAK=true
. ./test-lib.sh
valid_ref() {