Re: [PATCH] remote: plug memory leaks

Junio C Hamano <[email protected]>
Newsgroups org.kernel.vger.git
Message-ID <[email protected]>
Junio C Hamano <[email protected]> writes:

> The in-core data structure used to keep track of
> 'url.<real>.{insteadOf,pushInsteadOf} = <alias>' settings is not
> properly cleaned up when the process is done with it.
>
> Fix the rewrites_release() function to free not just the 'struct
> rewrites' instance itself, but also allocated structures that are
> pointed at by the 'struct rewrites' instance.  One of the embedded
> structures holds a 'const char *' to point at a borrowed constant
> string from a configuration callback.  Since the code does not
> modify this string, stop copying the value (alias URL) before
> registering it in 'struct rewrite', as nobody is freeing this
> member, to avoid leaking the extra copy.
>
> Signed-off-by: Junio C Hamano <[email protected]>
> ---
>
>  * These are not recently introduced leaks as far as I can tell, but
>    the new tests in en/submodule-insteadof-remote-match expose them.

It is unfortunately rare to see all CI jobs pass, but today is one
of those days ;-)

With this, and everything in 'seen' reported in the last edition of
the "What's cooking" report, excluding the
'tn/packfile-uri-concurrency' topic, CI passes all jobs.

  https://github.com/git/git/actions/runs/30137079882/

'tn/packfile-uri-concurrency' was tentatively excluded from the
above as I made a random guess at who the culprit for the t5550
failure in

  https://github.com/git/git/actions/runs/30130205851/job/89602846186

for the SHA-256 CI job was.  I have merged the topic back into
'seen', and the resulting CI run for 'seen' is here:

  https://github.com/git/git/actions/runs/30138777784/

It has not finished running, so we'll see how it goes.

Thanks.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.