Subject: Re: [PATCH 15/20] remote: fix leaking config strings

From: Junio C Hamano <[email-masked]>
Date: Wed, 21 Aug 2024 10:58:55 -0700

Patrick Steinhardt <[email-masked]> writes:

> @@ -2802,6 +2809,7 @@ void remote_state_clear(struct remote_state *remote_state)
>  	for (i = 0; i < remote_state->remotes_nr; i++)
>  		remote_clear(remote_state->remotes[i]);
>  	FREE_AND_NULL(remote_state->remotes);
> +	FREE_AND_NULL(remote_state->pushremote_name);
>  	remote_state->remotes_alloc = 0;
>  	remote_state->remotes_nr = 0;

As remote_state has two extra structures embedded in it, I wonder if
we should be clearing them in this function, but possibly it is
cleared elsewhere or perhaps in a later series?

As the focus of this step is about strings that we obtained from the
config API, it is totally outside the scope of this topic, even if
it turns out to be needed to clear them.

Looking good.  Thanks.