t/helper: fix leaking repository in partial-clone helper

We initialize but never clear a repository in the partial-clone test
helper. Plug this leak.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Patrick Steinhardt 2024-09-30 11:13:40 +02:00 committed by Junio C Hamano
parent 6361dea6e8
commit 58888c0401
2 changed files with 3 additions and 0 deletions

View File

@ -26,6 +26,8 @@ static void object_info(const char *gitdir, const char *oid_hex)
if (oid_object_info_extended(&r, &oid, &oi, 0))
die("could not obtain object info");
printf("%d\n", (int) size);
repo_clear(&r);
}
int cmd__partial_clone(int argc, const char **argv)

View File

@ -2,6 +2,7 @@
test_description='partial clone'
TEST_PASSES_SANITIZE_LEAK=true
. ./test-lib.sh
. "$TEST_DIRECTORY"/lib-terminal.sh