Re: [PATCH] builtin/: add UNLEAKs

2017-10-03 Thread Junio C Hamano
Martin Ågren writes: >> 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. :-) OK, let's merge this to 'next', then.

Re: [PATCH] builtin/: add UNLEAKs

2017-10-02 Thread Martin Ågren
On 2 October 2017 at 08:25, Jeff King wrote: > 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

Re: [PATCH] builtin/: add UNLEAKs

2017-10-02 Thread Jeff King
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

Re: [PATCH] builtin/: add UNLEAKs

2017-10-01 Thread Junio C Hamano
Martin Ågren writes: > ... While addressing `msg` in builtin/tag.c, convert the existing > `strbuf_release()` calls as well. That part of this patch made me raise eyebrows a bit but only slightly. We are about to leave the function to exit anyway, and all the other that

[PATCH] builtin/: add UNLEAKs

2017-10-01 Thread Martin Ågren
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. Signed-off-by: Martin Ågren --- builtin/checkout.c