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>

Patrick Steinhardt committed Sep 30, 2024 at 11:13 UTC 58888c0401a43bfe2953b0508b5f1bd6c3f32b89
2 files changed +3
t/helper/test-partial-clone.c
+2
@@ -26,6 +26,8 @@ static void object_info(const char *gitdir, const char *oid_hex)
26 if (oid_object_info_extended(&r, &oid, &oi, 0))
27 die("could not obtain object info");
28 printf("%d\n", (int) size);
29 +
30 + repo_clear(&r);
31 }
32
33 int cmd__partial_clone(int argc, const char **argv)
t/t0410-partial-clone.sh
+1
@@ -2,6 +2,7 @@
2
3 test_description='partial clone'
4
5 +TEST_PASSES_SANITIZE_LEAK=true
6 . ./test-lib.sh
7 . "$TEST_DIRECTORY"/lib-terminal.sh
8