diff options
| author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2022-07-01 12:37:38 +0200 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2022-07-01 13:38:50 -0700 |
| commit | 9794633b4e9fefd83fa39c2fd05e9ac8068b744d (patch) | |
| tree | 8df50a877ce0a80d743fe9d3f928061b83421c77 /t/helper/test-bloom.c | |
| parent | 1caaa858ccec11adaa3f9a649c15b766da474078 (diff) | |
| download | git-9794633b4e9fefd83fa39c2fd05e9ac8068b744d.tar.gz | |
test-tool bloom: fix memory leaks
Fix memory leaks introduced with these tests in f1294eaf7fb (bloom.c:
introduce core Bloom filter constructs, 2020-03-30), as a result we
can mark almost the entirety of t0095-bloom.sh as passing with
SANITIZE=leak using "TEST_PASSES_SANITIZE_LEAK=true", there's still an
unrelated memory leak in "git commit" in one of the tests, let's skip
that one under SANITIZE_LEAK for now.
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-bloom.c')
| -rw-r--r-- | t/helper/test-bloom.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/t/helper/test-bloom.c b/t/helper/test-bloom.c index ad3ef1cd77..6c900ca668 100644 --- a/t/helper/test-bloom.c +++ b/t/helper/test-bloom.c @@ -16,6 +16,7 @@ static void add_string_to_filter(const char *data, struct bloom_filter *filter) } printf("\n"); add_key_to_filter(&key, filter, &settings); + clear_bloom_key(&key); } static void print_bloom_filter(struct bloom_filter *filter) { @@ -80,6 +81,7 @@ int cmd__bloom(int argc, const char **argv) } print_bloom_filter(&filter); + free(filter.data); } if (!strcmp(argv[1], "get_filter_for_commit")) { |
