All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: git@vger.kernel.org, Ted Nyman <tnyman@openai.com>
Cc: "Éric NICOLAS" <ccjmne@gmail.com>
Subject: Re: [PATCH] remote: plug memory leaks
Date: Fri, 24 Jul 2026 18:57:05 -0700	[thread overview]
Message-ID: <xmqqbjbv3k7i.fsf@gitster.g> (raw)
In-Reply-To: <xmqqv7a33nm9.fsf@gitster.g> (Junio C. Hamano's message of "Fri, 24 Jul 2026 17:43:26 -0700")

Junio C Hamano <gitster@pobox.com> 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 <gitster@pobox.com>
> ---
>
>  * 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.

      reply	other threads:[~2026-07-25  1:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-25  0:43 [PATCH] remote: plug memory leaks Junio C Hamano
2026-07-25  1:57 ` Junio C Hamano [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqbjbv3k7i.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=ccjmne@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=tnyman@openai.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.