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

Re: [PATCH] commit-graph: release strbufs after use

From
Derrick Stolee <stolee@gmail.com>
Date
Aug 7, 2019, 13:16 UTC
Message-ID
<a2f30b81-ba93-579c-98ec-07f5df1043d7@gmail.com>
In-Reply-To
<c3be25bf-6487-52ce-217d-d6ee93b3a16f@web.de>
On 8/7/2019 7:15 AM, René Scharfe wrote:
> Signed-off-by: René Scharfe <l.s.r@web.de>
> ---
> Patch generated with --function-context for easier review.  That makes
> it look a lot bigger than it actually is, though.
Thanks for the --function-context. It really does clarify what's going on,
especially in the case with the "out:" label.
 
Show 6 quoted lines
> The plugged leaks were added after v2.22.0 (2019-06-07) by the following
> commits:
> 
> 5c84b3396c 2019-06-18 commit-graph: load commit-graph chains
> ef5b83f2cf 2019-06-12 commit-graph: extract fill_oids_from_packs()
> 8d84097f96 2019-06-18 commit-graph: expire commit-graph files
Your changes look good to me.
> -	strbuf_reset(&progress_title);
> +	strbuf_release(&progress_title);

This line confused me as I'm sure I adapted it from another place in code, and sure enough in the old code, progress_title was re-used between multiple stages. That's why it was a 'reset' when it should have been a 'release'.

Thanks! -Stolee

Previous: René ScharfeNext: Junio C Hamano
Message 2 of 3 in “commit-graph: release strbufs after use”
  1. commit-graph: release strbufs after useRené Scharfe, Aug 7, 2019
  2. Derrick StoleeAug 7, 2019
  3. Junio C HamanoAug 7, 2019

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.