Merge branch 'ps/leakfixes'

Leakfix.

* ps/leakfixes:
  setup: fix leaking repository format
  setup: refactor `upgrade_repository_format()` to have common exit
  shallow: fix memory leak when registering shallow roots
  test-bloom: stop setting up Git directory twice
This commit is contained in:
Junio C Hamano
2023-11-08 15:04:41 +09:00
5 changed files with 28 additions and 13 deletions

View File

@ -40,7 +40,6 @@ static void get_bloom_filter_for_commit(const struct object_id *commit_oid)
{
struct commit *c;
struct bloom_filter *filter;
setup_git_directory();
c = lookup_commit(the_repository, commit_oid);
filter = get_or_compute_bloom_filter(the_repository, c, 1,
&settings,

View File

@ -1,6 +1,8 @@
#!/bin/sh
test_description='check bitmap operation with shallow repositories'
TEST_PASSES_SANITIZE_LEAK=true
. ./test-lib.sh
# We want to create a situation where the shallow, grafted

View File

@ -2,6 +2,7 @@
test_description='errors in upload-pack'
TEST_PASSES_SANITIZE_LEAK=true
. ./test-lib.sh
D=$(pwd)