summaryrefslogtreecommitdiff
path: root/t/helper/test-oid-array.c
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2021-10-07 10:01:34 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-10-07 22:40:15 (GMT)
commit6ad66ab45e5e23378a6abf2c1d680b4cf8b85877 (patch)
tree7e00f63dfb94b450e0bea297d3ada7eaa6757a3d /t/helper/test-oid-array.c
parent926d2330357a4ee7247b83ec4fd1ed6dba72c54e (diff)
downloadgit-6ad66ab45e5e23378a6abf2c1d680b4cf8b85877.zip
git-6ad66ab45e5e23378a6abf2c1d680b4cf8b85877.tar.gz
git-6ad66ab45e5e23378a6abf2c1d680b4cf8b85877.tar.bz2
tests: fix test-oid-array leak, test in SANITIZE=leak
Fix a trivial memory leak present ever since 38d905bf585 (sha1-array: add test-sha1-array and basic tests, 2014-10-01), now that that's fixed we can test this under GIT_TEST_PASSING_SANITIZE_LEAK=true. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/helper/test-oid-array.c')
-rw-r--r--t/helper/test-oid-array.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/t/helper/test-oid-array.c b/t/helper/test-oid-array.c
index b16cd0b..d1324d0 100644
--- a/t/helper/test-oid-array.c
+++ b/t/helper/test-oid-array.c
@@ -35,5 +35,9 @@ int cmd__oid_array(int argc, const char **argv)
else
die("unknown command: %s", line.buf);
}
+
+ strbuf_release(&line);
+ oid_array_clear(&array);
+
return 0;
}