submodule: fix leaking seen submodule names
We keep track of submodules we have already seen via a string map such that we don't process the same submodule twice. We never free that map though, causing a memory leak. Fix this leak by clearing the map. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
1a7e5efdb0
commit
fa0f27a19d
@ -1880,6 +1880,7 @@ int fetch_submodules(struct repository *r,
|
||||
strvec_clear(&spf.args);
|
||||
out:
|
||||
free_submodules_data(&spf.changed_submodule_names);
|
||||
string_list_clear(&spf.seen_submodule_names, 0);
|
||||
return spf.result;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user