diff options
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2022-03-04 19:32:07 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-03-04 22:24:18 +0100 |
commit | a41e8e74674d53a46616b01f2c18e43c7f2f30a8 (patch) | |
tree | cbc78213d5eae87f1157ee0f35ab673de68ae7f9 /urlmatch.h | |
parent | diff.c: free "buf" in diff_words_flush() (diff) | |
download | git-a41e8e74674d53a46616b01f2c18e43c7f2f30a8.tar.xz git-a41e8e74674d53a46616b01f2c18e43c7f2f30a8.zip |
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 73ee449bbf2 (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>
Diffstat (limited to '')
-rw-r--r-- | urlmatch.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/urlmatch.h b/urlmatch.h index 34a3ba6d19..9f40b00bfb 100644 --- a/urlmatch.h +++ b/urlmatch.h @@ -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 */ |