mirror of
https://github.com/git/git.git
synced 2024-11-27 03:53:55 +08:00
upload-pack: fix leaking URI protocols
We don't clear `struct upload_pack::uri_protocols`, which causes a memory leak. Fix this. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
0b20a28811
commit
3b373150c8
@ -7,6 +7,7 @@ TEST_NO_CREATE_REPO=1
|
|||||||
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
|
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
|
||||||
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
|
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
|
||||||
|
|
||||||
|
TEST_PASSES_SANITIZE_LEAK=true
|
||||||
. ./test-lib.sh
|
. ./test-lib.sh
|
||||||
|
|
||||||
# Test protocol v2 with 'git://' transport
|
# Test protocol v2 with 'git://' transport
|
||||||
|
@ -166,6 +166,7 @@ static void upload_pack_data_clear(struct upload_pack_data *data)
|
|||||||
object_array_clear(&data->extra_edge_obj);
|
object_array_clear(&data->extra_edge_obj);
|
||||||
list_objects_filter_release(&data->filter_options);
|
list_objects_filter_release(&data->filter_options);
|
||||||
string_list_clear(&data->allowed_filters, 0);
|
string_list_clear(&data->allowed_filters, 0);
|
||||||
|
string_list_clear(&data->uri_protocols, 0);
|
||||||
|
|
||||||
free((char *)data->pack_objects_hook);
|
free((char *)data->pack_objects_hook);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user