Re: [PATCH 06/21] diff-lib: fix leaking diffopts in `do_diff_cache()`
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.
--
Kristoffer Haugsbakk