summaryrefslogtreecommitdiff
path: root/submodule.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-09-05 12:08:53 +0200
committerJunio C Hamano <gitster@pobox.com>2024-09-05 08:49:11 -0700
commit3eefd348e5865b0406d32194a157ae77d9a7939b (patch)
treef65599e328299448b05394423ec577126ea88839 /submodule.c
parentac2e7d545efdc4ceeef8c1191bb276e86d793f29 (diff)
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>
Diffstat (limited to 'submodule.c')
-rw-r--r--submodule.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/submodule.c b/submodule.c
index 97516b0fec..97d0d47b56 100644
--- a/submodule.c
+++ b/submodule.c
@@ -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;
}