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