Re: [PATCH] commit-graph: release strbufs after use
From: Junio C Hamano <hidden>
Date: 2019-08-07 19:25:13
Derrick Stolee [off-list ref] writes:
On 8/7/2019 7:15 AM, René Scharfe wrote:quoted
Signed-off-by: René Scharfe <redacted> --- 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.
Yes in general, but it can cut both ways ;-)
quoted
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 filesYour changes look good to me.
Thanks.
quoted
- 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