mirror of
https://github.com/git/git.git
synced 2024-11-23 18:05:29 +08:00
builtin/submodule--helper: fix leaking refs on push-check
In the push-check subcommand of the submodule helper we acquire a list of local refs, but never free that list. Fix this memory leak. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
3eefd348e5
commit
1e8cb17ac5
@ -2958,7 +2958,9 @@ static int push_check(int argc, const char **argv, const char *prefix UNUSED)
|
||||
rs->src);
|
||||
}
|
||||
}
|
||||
|
||||
refspec_clear(&refspec);
|
||||
free_refs(local_refs);
|
||||
}
|
||||
free(head);
|
||||
|
||||
|
@ -8,6 +8,7 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
|
||||
GIT_TEST_FATAL_REGISTER_SUBMODULE_ODB=1
|
||||
export GIT_TEST_FATAL_REGISTER_SUBMODULE_ODB
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
test_expect_success setup '
|
||||
|
Loading…
Reference in New Issue
Block a user