From: Ali Gholami Rudi <ali@rudi.ir>
To: Junio C Hamano <gitster@pobox.com>
Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>, git@vger.kernel.org
Subject: Re: [PATCH] builtin-clone.c: fix memory leak in cmd_clone()
Date: Thu, 2 Apr 2009 00:47:04 +0430 [thread overview]
Message-ID: <20090401201704.GA2237@lilem.mirepesht> (raw)
In-Reply-To: <7v3acs1gyf.fsf@gitster.siamese.dyndns.org>
Hi,
Junio C Hamano <gitster@pobox.com> wrote:
> Yup, I'll queue (I won't have time today to work on git it seems) the
Thanks.
> other two patches from you, but I was going to drop this one---unless your
> plan was to make cmd_clone() callable more than once in order to use it in
> say a C rewrite of git submodule or something like that.
The only problem in builtin-clone.c seems to be remove_junk() which is
called from a signal handler or atexit(). cmd_clone() can be changed to
register this function only once.
remove_junk() uses junk_* global variables which are overwritten in each
cmd_clone() call. Since no concurrent cmd_clone() is allowed (?) and we
only care about the last one, this does not seem to be an issue.
I'll probably send a new patch tomorrow.
Regards,
Ali
prev parent reply other threads:[~2009-04-01 20:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-01 14:40 [PATCH] builtin-clone.c: fix memory leak in cmd_clone() Ali Gholami Rudi
2009-04-01 15:56 ` Johannes Schindelin
2009-04-01 16:12 ` Ali Gholami Rudi
2009-04-01 16:23 ` Junio C Hamano
2009-04-01 20:17 ` Ali Gholami Rudi [this message]
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=20090401201704.GA2237@lilem.mirepesht \
--to=ali@rudi.ir \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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).