diff options
author | Patrick Steinhardt <ps@pks.im> | 2024-08-01 12:40:56 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-08-01 17:47:37 +0200 |
commit | 11f841c1cc9c7ffadf5d462d25a378fcab5bb6e1 (patch) | |
tree | fd03655da0f37f65038aac6f6d40b826f581e307 /t/t5318-commit-graph.sh | |
parent | builtin/credential-cache: fix trivial leaks (diff) | |
download | git-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-x | t/t5318-commit-graph.sh | 2 |
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 |