From: Jeff King <peff@peff.net>
To: "René Scharfe" <l.s.r@web.de>
Cc: "Git Mailing List" <git@vger.kernel.org>,
"Junio C Hamano" <gitster@pobox.com>,
"Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Subject: Re: [PATCH] receive-pack: plug minor memory leak in unpack()
Date: Sat, 11 Oct 2014 21:53:21 -0400 [thread overview]
Message-ID: <20141012015321.GA15272@peff.net> (raw)
In-Reply-To: <54390DC0.8060302@web.de>
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
next prev parent reply other threads:[~2014-10-12 1:53 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-11 11:00 [PATCH] receive-pack: plug minor memory leak in unpack() René Scharfe
2014-10-12 1:53 ` Jeff King [this message]
2014-10-13 19:08 ` Junio C Hamano
2014-10-14 9:16 ` Jeff King
2014-10-19 11:13 ` René Scharfe
2014-10-20 9:19 ` Jeff King
2014-10-19 11:13 ` [PATCH 1/2] run-command: add env_array, an optional argv_array for env René Scharfe
2014-10-19 11:14 ` [PATCH 2/2] use env_array member of struct child_process René Scharfe
2014-10-20 9:19 ` Jeff King
2014-11-09 13:49 ` René Scharfe
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141012015321.GA15272@peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=l.s.r@web.de \
--cc=pclouds@gmail.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.
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 NNTP newsgroup(s).