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