summaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-05-27 13:46:54 +0200
committerJunio C Hamano <gitster@pobox.com>2024-05-27 20:20:01 +0200
commitba9d029445e183d7c7dda75887cee1b5d6fee1d7 (patch)
tree7909e0eedd9c7ca6d0ef60aa3d230cc3d47b530e /t
parentbuiltin/credential: clear credential before exit (diff)
downloadgit-ba9d029445e183d7c7dda75887cee1b5d6fee1d7.tar.xz
git-ba9d029445e183d7c7dda75887cee1b5d6fee1d7.zip
commit-reach: fix memory leak in `ahead_behind()`
We use a priority queue in `ahead_behind()` to compute the ahead/behind count for commits. We may not iterate through all commits part of that queue though in case all of its entries are stale. Consequently, as we never make the effort to release the remaining commits, we end up leaking bit arrays that we have allocated for each of the contained commits. Plug this leak and mark the corresponding test as leak free. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t3203-branch-output.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/t/t3203-branch-output.sh b/t/t3203-branch-output.sh
index 758963b189..e627f08a17 100755
--- a/t/t3203-branch-output.sh
+++ b/t/t3203-branch-output.sh
@@ -1,6 +1,8 @@
#!/bin/sh
test_description='git branch display tests'
+
+TEST_PASSES_SANITIZE_LEAK=true
. ./test-lib.sh
. "$TEST_DIRECTORY"/lib-terminal.sh