Re: [PATCH] receive-pack: plug minor memory leak in unpack()

2014-10-20 Thread Jeff King
On Sun, Oct 19, 2014 at 01:13:30PM +0200, René Scharfe wrote: We could flip it to give the managed version the short name (and calling the unmanaged version env_ptr or something). That would require munging the existing callers, but the tweak would be simple. Perhaps, but I'm a but

Re: [PATCH] receive-pack: plug minor memory leak in unpack()

2014-10-19 Thread René Scharfe
Am 14.10.2014 um 11:16 schrieb Jeff King: On Mon, Oct 13, 2014 at 12:08:09PM -0700, Junio C Hamano wrote: I wonder if run-command should provide a managed env array similar to the args array. That's a good idea. I took a look at a few of them: I took a brief look, too. I had hoped we

Re: [PATCH] receive-pack: plug minor memory leak in unpack()

2014-10-14 Thread Jeff King
On Mon, Oct 13, 2014 at 12:08:09PM -0700, Junio C Hamano wrote: I wonder if run-command should provide a managed env array similar to the args array. I took a look at a few of them: I took a brief look, too. I had hoped we could just all it env and everybody would be happy using it

Re: [PATCH] receive-pack: plug minor memory leak in unpack()

2014-10-13 Thread Junio C Hamano
Jeff King p...@peff.net writes: On Sat, Oct 11, 2014 at 01:00:16PM +0200, René Scharfe wrote: The argv_array used in unpack() is never freed. Instead of adding explicit calls to argv_array_clear() use the args member of struct child_process and let run_command() and friends clean up for us.

[PATCH] receive-pack: plug minor memory leak in unpack()

2014-10-11 Thread René Scharfe
The argv_array used in unpack() is never freed. Instead of adding explicit calls to argv_array_clear() use the args member of struct child_process and let run_command() and friends clean up for us. Signed-off-by: Rene Scharfe l@web.de --- builtin/receive-pack.c | 18 -- 1

Re: [PATCH] receive-pack: plug minor memory leak in unpack()

2014-10-11 Thread Jeff King
On Sat, Oct 11, 2014 at 01:00:16PM +0200, René Scharfe wrote: The argv_array used in unpack() is never freed. Instead of adding explicit calls to argv_array_clear() use the args member of struct child_process and let run_command() and friends clean up for us. Looks good. I notice that the