git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] transport: fix leak with transport helper URLs

From
Patrick Steinhardt <ps@pks.im>
Date
Aug 8, 2024, 04:52 UTC
Message-ID
<ZrRPD0ggZapZym7E@tanuki>
In-Reply-To
<xmqq34nfn7ip.fsf@gitster.g>
On Wed, Aug 07, 2024 at 06:11:10PM -0700, Junio C Hamano wrote:
Show 10 quoted lines
> Transport URLs can be prefixed with "foo::", which would tell us that
> the transport uses a remote helper called "foo". We extract the helper
> name by `xstrndup()`ing the prefix before the double-colons, but never
> free that string.
> 
> Fix this leak by assigning the result to a separate local variable that
> we can then free upon returning.
> 
> Helped-by: Patrick Steinhardt <ps@pks.im>
> Signed-off-by: Junio C Hamano <gitster@pobox.com>

I saw that you've merged this to `next` already, but: this looks good to me, thanks!

Patrick
Previous: Junio C HamanoNext: Patrick Steinhardt
Message 2 of 4 in “transport: fix leak with transport helper URLs”
  1. transport: fix leak with transport helper URLsJunio C Hamano, Aug 8, 2024
  2. Patrick SteinhardtAug 8, 2024
  3. Patrick SteinhardtAug 8, 2024
  4. Junio C HamanoAug 8, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.