aboutsummaryrefslogtreecommitdiff
path: root/submodule.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-09-26 13:46:08 +0200
committerJunio C Hamano <gitster@pobox.com>2024-09-27 08:25:34 -0700
commit2e492f2047748cf70350d503214ef89f1110ee82 (patch)
tree88f9c78428ceea8acde6798128f3b52ac96f0759 /submodule.c
parent3aef7a05adb2868118181eb5605fffa65a9af2c8 (diff)
downloadgit-2e492f2047748cf70350d503214ef89f1110ee82.tar.xz
submodule: fix leaking update strategy
We're not freeing the submodule update strategy command. Provide a helper function that does this for us and call it in `update_data_release()`. 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.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/submodule.c b/submodule.c
index 97d0d47b56..0e67984d77 100644
--- a/submodule.c
+++ b/submodule.c
@@ -424,6 +424,11 @@ int parse_submodule_update_strategy(const char *value,
return 0;
}
+void submodule_update_strategy_release(struct submodule_update_strategy *strategy)
+{
+ free((char *) strategy->command);
+}
+
const char *submodule_update_type_to_string(enum submodule_update_type type)
{
switch (type) {