submodule: fix leaking fetch task data
The `submodule_parallel_fetch` structure contains various data structures that we use to set up parallel fetches of submodules. We do not free some of its data though, causing memory leaks. Plug those. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>maint
parent
ac2e7d545e
commit
3eefd348e5
|
@ -1883,6 +1883,8 @@ int fetch_submodules(struct repository *r,
|
|||
out:
|
||||
free_submodules_data(&spf.changed_submodule_names);
|
||||
string_list_clear(&spf.seen_submodule_names, 0);
|
||||
strbuf_release(&spf.submodules_with_errors);
|
||||
free(spf.oid_fetch_tasks);
|
||||
return spf.result;
|
||||
}
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@ test_description='Recursive "git fetch" for submodules'
|
|||
GIT_TEST_FATAL_REGISTER_SUBMODULE_ODB=1
|
||||
export GIT_TEST_FATAL_REGISTER_SUBMODULE_ODB
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
pwd=$(pwd)
|
||||
|
|
Loading…
Reference in New Issue