Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2021-10-07 13:01:31 +0300
committerJunio C Hamano <gitster@pobox.com>2021-10-08 01:40:15 +0300
commit6a75658c0ae7c822c50ab09d56388e48f22e6c31 (patch)
treec77ddeb1359c546f67b7db1bfb9dc5cc3e0c5261 /t/t0009-prio-queue.sh
parent6cb3deb4512a9c637c9814a691c1cc4b5b7ce701 (diff)
tests: fix a memory leak in test-prio-queue.c
Fix a memory leak in t/helper/test-prio-queue.c, the lack of freeing the memory with clear_prio_queue() has been there ever since this code was originally added in b4b594a3154 (prio-queue: priority queue of pointers to structs, 2013-06-06). By fixing this leak we can cleanly run t0009-prio-queue.sh under SANITIZE=leak, so annotate it as such with 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/t0009-prio-queue.sh')
-rwxr-xr-xt/t0009-prio-queue.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/t/t0009-prio-queue.sh b/t/t0009-prio-queue.sh
index 3941ad2528..eea99107a4 100755
--- a/t/t0009-prio-queue.sh
+++ b/t/t0009-prio-queue.sh
@@ -1,6 +1,8 @@
#!/bin/sh
test_description='basic tests for priority queue implementation'
+
+TEST_PASSES_SANITIZE_LEAK=true
. ./test-lib.sh
cat >expect <<'EOF'