mirror of
https://github.com/git/git.git
synced 2024-10-28 04:49:43 +01:00
t/helper: fix leaking subrepo in nested submodule config helper
In the "submodule-nested-repo-config" helper we create a submodule repository and print its configuration. We do not clear the repo, causing a memory leak. Plug it. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
2266bb4f6a
commit
f1652c04b5
2 changed files with 2 additions and 1 deletions
|
@ -29,6 +29,6 @@ int cmd__submodule_nested_repo_config(int argc, const char **argv)
|
|||
print_config_from_gitmodules(&subrepo, argv[2]);
|
||||
|
||||
submodule_free(the_repository);
|
||||
|
||||
repo_clear(&subrepo);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -10,6 +10,7 @@ from the database and from the worktree works.
|
|||
'
|
||||
|
||||
TEST_NO_CREATE_REPO=1
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
test_expect_success 'setup' '
|
||||
|
|
Loading…
Reference in a new issue