transport: fix leaking OID arrays in git:// transport data
The transport data for the "git://" protocol contains two OID arrays that we never free, creating a memory leak. Plug them. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>maint
parent
fb24460e1d
commit
ca52234183
|
@ -4,6 +4,7 @@ test_description='fetch/push involving alternates'
|
|||
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
|
||||
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
count_objects () {
|
||||
|
|
|
@ -5,6 +5,7 @@ test_description='push to a repository that borrows from elsewhere'
|
|||
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
|
||||
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
test_expect_success setup '
|
||||
|
|
|
@ -946,6 +946,8 @@ static int disconnect_git(struct transport *transport)
|
|||
}
|
||||
|
||||
list_objects_filter_release(&data->options.filter_options);
|
||||
oid_array_clear(&data->extra_have);
|
||||
oid_array_clear(&data->shallow);
|
||||
free(data);
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue