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>
This commit is contained in:
committed by
Junio C Hamano
parent
ba9d029445
commit
3ef52dd112
@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user