Re: [PATCH] builtin/: add UNLEAKs
- From
- Martin Ågren <martin.agren@gmail.com>
- Date
- Oct 2, 2017, 10:20 UTC
- Message-ID
- <CAN0heSoson-KkbgVnRPdTmRL2MMDU1+L6XdOHhi6xcZS5rwQcQ@mail.gmail.com>
- In-Reply-To
- <20171002062528.naa5hrqoao5sifs3@sigill.intra.peff.net>
On 2 October 2017 at 08:25, Jeff King <peff@peff.net> wrote:
Show 12 quoted lines
> On Sun, Oct 01, 2017 at 07:42:08PM +0200, Martin Ågren wrote: > >> Add some UNLEAKs where we are about to return from `cmd_*`. UNLEAK the >> variables in the same order as we've declared them. While addressing >> `msg` in builtin/tag.c, convert the existing `strbuf_release()` calls as >> well. > > It might have raised Junio's eyebrows less to say something like: > > ...convert the existing strbuf_release() calls as well (they're not > wrong, but they also accomplish nothing and create an inconsistency > with the UNLEAKed variables).
Most likely yes. Sorry about that. I have yet to be critiqued for writing *too much* in a commit message. That should tell me something.
> Seeing hunks like this makes me happy with the UNLEAK() solution. It > would have been a real pain to do this via actual freeing.
Yes, I was very happy to have it handy. :-)
Martin