diff options
| author | Patrick Steinhardt <ps@pks.im> | 2024-05-27 13:46:59 +0200 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-05-27 11:20:01 -0700 |
| commit | 3ef52dd1125b6c9223fd03aca146f6b799e014f9 (patch) | |
| tree | cfb8ddec6bee9db44e00ce58c55454202a827fdc /submodule-config.c | |
| parent | ba9d029445e183d7c7dda75887cee1b5d6fee1d7 (diff) | |
| download | git-3ef52dd1125b6c9223fd03aca146f6b799e014f9.tar.gz | |
submodule: fix leaking memory for submodule entries
In `free_one_config()` we never end up freeing the `url` and `ignore`
fields and thus leak memory. Fix those leaks and mark now-passing tests
as leak free.
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.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/submodule-config.c b/submodule-config.c index 11428b4ada..ec45ea67b9 100644 --- a/submodule-config.c +++ b/submodule-config.c @@ -91,6 +91,8 @@ static void free_one_config(struct submodule_entry *entry) free((void *) entry->config->path); free((void *) entry->config->name); free((void *) entry->config->branch); + free((void *) entry->config->url); + free((void *) entry->config->ignore); free((void *) entry->config->update_strategy.command); free(entry->config); } |
