git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: Jonas Fonseca <fonseca@diku.dk>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Fix memory leaks in read_tree_recursive()
Date: Wed, 04 May 2005 16:43:17 -0700	[thread overview]
Message-ID: <7vpsw6muay.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <20050504231959.GA25475@diku.dk> (Jonas Fonseca's message of "Thu, 5 May 2005 01:19:59 +0200")

>>>>> "JF" == Jonas Fonseca <fonseca@diku.dk> writes:

JF> This patch fixes memory leaks in the error path of
JF> read_tree_recursive().

The leak seems to be real but what is "mem_free"?  Has it been
compile tested?

JF> @@ -39,14 +39,18 @@
JF>  		if (S_ISDIR(mode)) {
JF>  			int retval;
 
JF> ...
JF> -			if (!eltbuf || strcmp(elttype, "tree"))
JF> +			if (!eltbuf || strcmp(elttype, "tree")) {
JF> +				if (eltbuf) mem_free(eltbuf);
JF>  				return -1;

Btw, who is putting this header in your mail?  It does not make
sense to me unless Jonas is pseudonym for Linus...

  Mail-Followup-To: Linus Torvalds <torvalds@osdl.org>, git@vger.kernel.org 



  parent reply	other threads:[~2005-05-04 23:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-04 23:19 [PATCH] Fix memory leaks in read_tree_recursive() Jonas Fonseca
2005-05-04 23:39 ` Jonas Fonseca
2005-05-04 23:43 ` Junio C Hamano [this message]
2005-05-05  0:08   ` Jonas Fonseca

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vpsw6muay.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=fonseca@diku.dk \
    --cc=git@vger.kernel.org \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).