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

From: Jeff King <[email-masked]>
Date: Sat, 11 Oct 2014 21:53:21 -0400

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 recently added prepare_push_cert_sha1 uses
an argv_array to create the child_process.env, and we leak the result. I
wonder if run-command should provide a managed env array similar to the
"args" array.

-Peff