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>
This commit is contained in:
Patrick Steinhardt
2024-09-26 13:46:08 +02:00
committed by Junio C Hamano
parent 3aef7a05ad
commit 2e492f2047
5 changed files with 12 additions and 3 deletions

View File

@ -2021,6 +2021,7 @@ struct update_data {
static void update_data_release(struct update_data *ud)
{
free(ud->displaypath);
submodule_update_strategy_release(&ud->update_strategy);
module_list_release(&ud->list);
}