Re: [PATCH 3/5] diff --color-moved-ws: fix a memory leak
- From
Stefan Beller <sbeller@google.com>
- Date
- Oct 2, 2018, 19:08 UTC
- Message-ID
- <CAGZ79kbX+DssZaCS_fV-eNR828Yd-vsLJ6F58Lifn2f8j+oXvA@mail.gmail.com>
- In-Reply-To
- <20181002175514.31495-3-phillip.wood@talktalk.net>
On Tue, Oct 2, 2018 at 10:55 AM Phillip Wood <phillip.wood@talktalk.net> wrote:
Show 5 quoted lines
> > From: Phillip Wood <phillip.wood@dunelm.org.uk> > > Don't duplicate the indentation string if we're not going to use it. > This was found with asan.
Makes sense,
Thanks, Stefan
With compute_ws_delta growing bigger here (and having only one caller),
I wonder if we want to pass 'match' instead of match->es (and pmb_nr),
such that the function can also take care of
pmb[pmb_nr++].match = match;Then the function is not a mere compute_ws_delta, but a whole setup_new_pmb(...) thing. Undecided.