From: Phillip Wood <phillip.wood@talktalk.net>
To: Stefan Beller <sbeller@google.com>,
Phillip Wood <phillip.wood@dunelm.org.uk>
Cc: git <git@vger.kernel.org>, Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH 3/5] diff --color-moved-ws: fix a memory leak
Date: Wed, 3 Oct 2018 10:42:14 +0100 [thread overview]
Message-ID: <5821aa37-b1aa-9118-5920-cfa60b243032@talktalk.net> (raw)
In-Reply-To: <CAGZ79kbX+DssZaCS_fV-eNR828Yd-vsLJ6F58Lifn2f8j+oXvA@mail.gmail.com>
On 02/10/2018 20:08, Stefan Beller wrote:
> On Tue, Oct 2, 2018 at 10:55 AM Phillip Wood <phillip.wood@talktalk.net> wrote:
>>
>> 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;
Wouldn't we still need to increment pmb_nr in the caller though, in
which case I'm not sure it saves much.
> Then the function is not a mere compute_ws_delta, but a whole
> setup_new_pmb(...) thing. Undecided.
>
next prev parent reply other threads:[~2018-10-03 9:42 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-02 17:55 [PATCH 1/5] diff --color-moved-ws: fix double free crash Phillip Wood
2018-10-02 17:55 ` [PATCH 2/5] diff --color-moved-ws: fix out of bounds string access Phillip Wood
2018-10-02 18:58 ` Stefan Beller
2018-10-03 9:40 ` Phillip Wood
2018-10-02 17:55 ` [PATCH 3/5] diff --color-moved-ws: fix a memory leak Phillip Wood
2018-10-02 19:08 ` Stefan Beller
2018-10-03 9:42 ` Phillip Wood [this message]
2018-10-03 9:54 ` Martin Ågren
2018-10-02 17:55 ` [PATCH 4/5] diff --color-moved-ws: fix another " Phillip Wood
2018-10-02 19:08 ` Stefan Beller
2018-10-02 17:55 ` [PATCH 5/5] diff --color-moved: fix a " Phillip Wood
2018-10-02 19:11 ` Stefan Beller
2018-10-02 18:49 ` [PATCH 1/5] diff --color-moved-ws: fix double free crash Stefan Beller
2018-10-03 9:38 ` Phillip Wood
2018-10-04 10:07 ` [PATCH v2 0/5] " Phillip Wood
2018-10-04 10:07 ` [PATCH v2 1/5] " Phillip Wood
2018-10-04 10:07 ` [PATCH v2 2/5] diff --color-moved-ws: fix out of bounds string access Phillip Wood
2018-10-04 10:07 ` [PATCH v2 3/5] diff --color-moved-ws: fix a memory leak Phillip Wood
2018-10-04 10:07 ` [PATCH v2 4/5] diff --color-moved-ws: fix another " Phillip Wood
2018-10-04 10:07 ` [PATCH v2 5/5] diff --color-moved: fix a " Phillip Wood
2018-10-04 19:42 ` Stefan Beller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5821aa37-b1aa-9118-5920-cfa60b243032@talktalk.net \
--to=phillip.wood@talktalk.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=phillip.wood@dunelm.org.uk \
--cc=sbeller@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).