summaryrefslogtreecommitdiff
path: root/t/helper/test-oidtree.c
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2021-10-07 10:01:33 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-10-07 22:40:15 (GMT)
commit926d2330357a4ee7247b83ec4fd1ed6dba72c54e (patch)
tree5f0539e3f88c40894bedcd2bafc370cf67d242cf /t/helper/test-oidtree.c
parentc0b80e05f79a3a81af202203237687b1f4b25605 (diff)
downloadgit-926d2330357a4ee7247b83ec4fd1ed6dba72c54e.zip
git-926d2330357a4ee7247b83ec4fd1ed6dba72c54e.tar.gz
git-926d2330357a4ee7247b83ec4fd1ed6dba72c54e.tar.bz2
tests: fix a memory leak in test-oidtree.c
Fix a memory leak in t/helper/test-oidtree.c, we were not freeing the "struct strbuf" we used for the stdin input we parsed. This leak has been here ever since 92d8ed8ac10 (oidtree: a crit-bit tree for odb_loose_cache, 2021-07-07). Now that it's fixed we can declare that t0069-oidtree.sh will pass 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-oidtree.c')
-rw-r--r--t/helper/test-oidtree.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/t/helper/test-oidtree.c b/t/helper/test-oidtree.c
index 180ee28..d48a409 100644
--- a/t/helper/test-oidtree.c
+++ b/t/helper/test-oidtree.c
@@ -45,5 +45,8 @@ int cmd__oidtree(int argc, const char **argv)
die("unknown command: %s", line.buf);
}
}
+
+ strbuf_release(&line);
+
return 0;
}