[PATCH 10/23] t/helper: fix leaking repository in partial-clone helper

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Signed-off-by: Patrick Steinhardt <ps@xxxxxx>
---
 t/helper/test-partial-clone.c | 2 ++
 t/t0410-partial-clone.sh      | 1 +
 2 files changed, 3 insertions(+)

diff --git a/t/helper/test-partial-clone.c b/t/helper/test-partial-clone.c
index 0ead529167..a1af9710c3 100644
--- a/t/helper/test-partial-clone.c
+++ b/t/helper/test-partial-clone.c
@@ -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)
diff --git a/t/t0410-partial-clone.sh b/t/t0410-partial-clone.sh
index 34bdb3ab1f..818700fbec 100755
--- a/t/t0410-partial-clone.sh
+++ b/t/t0410-partial-clone.sh
@@ -2,6 +2,7 @@
 
 test_description='partial clone'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-terminal.sh
 
-- 
2.46.2.852.g229c0bf0e5.dirty





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux