From: Kristoffer Haugsbakk Date: Mon, 21 Oct 2024 09:46:23 GMT Subject: Re: [PATCH 06/21] diff-lib: fix leaking diffopts in `do_diff_cache()` Message-ID: <015d0995-c7db-45c9-9ad5-d4ea75d8f792@app.fastmail.com> In-Reply-To: <60af98cb2c7752edc7cd5c5fe8173dc5b2522a7b.1728624670.git.ps@pks.im> On Fri, Oct 11, 2024, at 07:32, Patrick Steinhardt wrote: > In `do_diff_cache()` we initialize a new `rev_info` and then overwrite > its `diffopt` with a user-provided set of options. This can leak memory > because `repo_init_revisions()` may end up allocating memory for the > `diffopt` itself depending on the configuration. And as that field is s/as that/since that/ “since” communicates causality better. > overwritten we won't ever free that. s/free that/free it/ -- Kristoffer Haugsbakk