mirror of
https://github.com/git/git.git
synced 2026-01-10 01:56:42 +00:00
urlmatch.c: add and use a *_release() function
Plug a memory leak in credential_apply_config() by adding and using a
new urlmatch_config_release() function. This just does a
string_list_clear() on the "vars" member.
This finished up work on normalizing the init/free pattern in this
API, started in 73ee449bbf (urlmatch.[ch]: add and use
URLMATCH_CONFIG_INIT, 2021-10-01).
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
a18d66cefb
commit
a41e8e7467
@@ -71,5 +71,6 @@ struct urlmatch_config {
|
||||
}
|
||||
|
||||
int urlmatch_config_entry(const char *var, const char *value, void *cb);
|
||||
void urlmatch_config_release(struct urlmatch_config *config);
|
||||
|
||||
#endif /* URL_MATCH_H */
|
||||
|
||||
Reference in New Issue
Block a user