summaryrefslogtreecommitdiffstats
path: root/t/t5318-commit-graph.sh
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-08-01 12:40:56 +0200
committerJunio C Hamano <gitster@pobox.com>2024-08-01 17:47:37 +0200
commit11f841c1cc9c7ffadf5d462d25a378fcab5bb6e1 (patch)
treefd03655da0f37f65038aac6f6d40b826f581e307 /t/t5318-commit-graph.sh
parentbuiltin/credential-cache: fix trivial leaks (diff)
downloadgit-11f841c1cc9c7ffadf5d462d25a378fcab5bb6e1.tar.xz
git-11f841c1cc9c7ffadf5d462d25a378fcab5bb6e1.zip
t/test-repository: fix leaking repository
The test-repository test helper zeroes out `the_repository` such that it can be sure that our codebase only ends up using the supplied repository that we initialize in the respective helper functions. This does cause memory leaks though as the data that `the_repository` has been holding onto is not referenced anymore. Fix this by calling `repo_clear()` instead. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to '')
-rwxr-xr-xt/t5318-commit-graph.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/t/t5318-commit-graph.sh b/t/t5318-commit-graph.sh
index a2b4442660..2916c07e3c 100755
--- a/t/t5318-commit-graph.sh
+++ b/t/t5318-commit-graph.sh
@@ -1,6 +1,8 @@
#!/bin/sh
test_description='commit graph'
+
+TEST_PASSES_SANITIZE_LEAK=true
. ./test-lib.sh
. "$TEST_DIRECTORY"/lib-chunk.sh