summaryrefslogtreecommitdiffstats
path: root/submodule-config.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 17:25:34 +0200
commit2e492f2047748cf70350d503214ef89f1110ee82 (patch)
tree88f9c78428ceea8acde6798128f3b52ac96f0759 /submodule-config.c
parentgit: fix leaking argv when handling builtins (diff)
downloadgit-2e492f2047748cf70350d503214ef89f1110ee82.tar.xz
git-2e492f2047748cf70350d503214ef89f1110ee82.zip
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-config.c')
-rw-r--r--submodule-config.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/submodule-config.c b/submodule-config.c
index c8f2bb2bdd..471637a725 100644
--- a/submodule-config.c
+++ b/submodule-config.c
@@ -95,7 +95,7 @@ static void free_one_config(struct submodule_entry *entry)
free((void *) entry->config->branch);
free((void *) entry->config->url);
free((void *) entry->config->ignore);
- free((void *) entry->config->update_strategy.command);
+ submodule_update_strategy_release(&entry->config->update_strategy);
free(entry->config);
}