git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] builtin-update-index.c (add_file_to_cache): Don't leak a cache entry.

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
Feb 16, 2007, 17:00 UTC
Message-ID
<Pine.LNX.4.64.0702160858190.20368@woody.linux-foundation.org>
In-Reply-To
<87mz3e327y.fsf@rho.meyering.net>
On Fri, 16 Feb 2007, Jim Meyering wrote:
Show 6 quoted lines
> 
> -	if (index_path(ce->sha1, path, &st, !info_only))
> +	if (index_path(ce->sha1, path, &st, !info_only)) {
> +		free(ce);
>  		return -1;
> +	}
Well, the only user of this does:
	if (add_file_to_cache(p))
		die("Unable to process file %s", path);
so the leak is very shortlived ;)
		Linus
Previous: Jim MeyeringNext: Jim Meyering
Message 2 of 3 in “builtin-update-index.c (add_file_to_cache): Don't leak a cache entry.”
  1. builtin-update-index.c (add_file_to_cache): Don't leak a cache entry.Jim Meyering, Feb 16, 2007
  2. Linus TorvaldsFeb 16, 2007
  3. Jim MeyeringFeb 18, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.