git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] http: don't leak urlmatch_config.vars
@ 2019-08-26  7:49 Mike Hommey
  2019-08-26 18:09 ` Junio C Hamano
  0 siblings, 1 reply; 2+ messages in thread
From: Mike Hommey @ 2019-08-26  7:49 UTC (permalink / raw)
  To: git; +Cc: gitster

Signed-off-by: Mike Hommey <mh@glandium.org>
---
 http.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/http.c b/http.c
index 27aa0a3192..9e33584f2d 100644
--- a/http.c
+++ b/http.c
@@ -1073,6 +1073,7 @@ void http_init(struct remote *remote, const char *url, int proactive_auth)
 
 	git_config(urlmatch_config_entry, &config);
 	free(normalized_url);
+	string_list_clear(&config.vars, 1);
 
 #if LIBCURL_VERSION_NUM >= 0x073800
 	if (http_ssl_backend) {
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] http: don't leak urlmatch_config.vars
  2019-08-26  7:49 [PATCH] http: don't leak urlmatch_config.vars Mike Hommey
@ 2019-08-26 18:09 ` Junio C Hamano
  0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2019-08-26 18:09 UTC (permalink / raw)
  To: Mike Hommey; +Cc: git

Mike Hommey <mh@glandium.org> writes:

> Signed-off-by: Mike Hommey <mh@glandium.org>
> ---
>  http.c | 1 +
>  1 file changed, 1 insertion(+)

This matches what builtin/config.c::get_urlmatch() does, which makes
sense.

Thanks.

>
> diff --git a/http.c b/http.c
> index 27aa0a3192..9e33584f2d 100644
> --- a/http.c
> +++ b/http.c
> @@ -1073,6 +1073,7 @@ void http_init(struct remote *remote, const char *url, int proactive_auth)
>  
>  	git_config(urlmatch_config_entry, &config);
>  	free(normalized_url);
> +	string_list_clear(&config.vars, 1);
>  
>  #if LIBCURL_VERSION_NUM >= 0x073800
>  	if (http_ssl_backend) {

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-08-26 18:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-26  7:49 [PATCH] http: don't leak urlmatch_config.vars Mike Hommey
2019-08-26 18:09 ` Junio C Hamano

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).