aboutsummaryrefslogtreecommitdiffstats
path: root/submodule-config.h
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-09-30 11:13:27 +0200
committerJunio C Hamano <gitster@pobox.com>2024-09-30 11:23:03 -0700
commit5cca114973c602c9f8516e9ed34c76fd75fb999e (patch)
tree2fc75d716b6d40bebc2cdd0345c765d21a498efd /submodule-config.h
parent666643fa89e4386c0f4eabd1112e8b3af0cb9cc1 (diff)
downloadgit-5cca114973c602c9f8516e9ed34c76fd75fb999e.tar.gz
submodule: fix leaking submodule entry list
The submodule entry list returned by `submodules_of_tree()` is never completely free'd by its only caller. Introduce a new function that free's the list for us and call it. While at it, also fix the leaking `branch_point` string. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'submodule-config.h')
-rw-r--r--submodule-config.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/submodule-config.h b/submodule-config.h
index b6133af71b..f55d4e3b61 100644
--- a/submodule-config.h
+++ b/submodule-config.h
@@ -136,4 +136,7 @@ struct submodule_entry_list {
void submodules_of_tree(struct repository *r,
const struct object_id *treeish_name,
struct submodule_entry_list *ret);
+
+void submodule_entry_list_release(struct submodule_entry_list *list);
+
#endif /* SUBMODULE_CONFIG_H */