Thread (97 messages) 97 messages, 5 authors, 2024-11-05

Re: [PATCH 06/21] diff-lib: fix leaking diffopts in `do_diff_cache()`

From: Kristoffer Haugsbakk <hidden>
Date: 2024-10-21 09:46:45

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help