{"thread":{"id":"51738","subject":"[PATCH] http: don't leak urlmatch_config.vars","startedAt":"2019-08-26T07:49:17Z","lastAt":"2019-08-26T18:10:01Z","messageCount":2,"participants":["Mike Hommey","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"381167","messageId":"20190826074911.23792-1-mh@glandium.org","threadId":"51738","inReplyTo":null,"subject":"[PATCH] http: don't leak urlmatch_config.vars","fromName":"Mike Hommey","fromEmail":"mh@glandium.org","sentAt":"2019-08-26T07:49:11Z","receivedAt":"2019-08-26T07:49:17Z","isPatch":true,"sender":{"key":"mh@glandium.org","avatar":"https://avatars.githubusercontent.com/u/1038527?v=4"},"body":"Signed-off-by: Mike Hommey <mh@glandium.org>\n---\n http.c | 1 +\n 1 file changed, 1 insertion(+)\n\ndiff --git a/http.c b/http.c\nindex 27aa0a3192..9e33584f2d 100644\n--- a/http.c\n+++ b/http.c\n@@ -1073,6 +1073,7 @@ void http_init(struct remote *remote, const char *url, int proactive_auth)\n \n \tgit_config(urlmatch_config_entry, &config);\n \tfree(normalized_url);\n+\tstring_list_clear(&config.vars, 1);\n \n #if LIBCURL_VERSION_NUM >= 0x073800\n \tif (http_ssl_backend) {\n-- \n2.23.0\n\n"},{"id":"381223","messageId":"xmqqblwbhk7f.fsf@gitster-ct.c.googlers.com","threadId":"51738","inReplyTo":"20190826074911.23792-1-mh@glandium.org","subject":"Re: [PATCH] http: don't leak urlmatch_config.vars","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-08-26T18:09:56Z","receivedAt":"2019-08-26T18:10:01Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Mike Hommey <mh@glandium.org> writes:\n\n> Signed-off-by: Mike Hommey <mh@glandium.org>\n> ---\n>  http.c | 1 +\n>  1 file changed, 1 insertion(+)\n\nThis matches what builtin/config.c::get_urlmatch() does, which makes\nsense.\n\nThanks.\n\n>\n> diff --git a/http.c b/http.c\n> index 27aa0a3192..9e33584f2d 100644\n> --- a/http.c\n> +++ b/http.c\n> @@ -1073,6 +1073,7 @@ void http_init(struct remote *remote, const char *url, int proactive_auth)\n>  \n>  \tgit_config(urlmatch_config_entry, &config);\n>  \tfree(normalized_url);\n> +\tstring_list_clear(&config.vars, 1);\n>  \n>  #if LIBCURL_VERSION_NUM >= 0x073800\n>  \tif (http_ssl_backend) {\n"}]}