diff options
author | Linus Torvalds <torvalds@osdl.org> | 2007-01-11 23:25:16 +0300 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2007-01-11 23:25:16 +0300 |
commit | 2cdf9509df66358f83a577caf83dc06e3161ec3c (patch) | |
tree | 2b6a8aebd67386fa7ce7425c9eeee4dfc23bde16 | |
parent | 2a3a3c247e7f1f257e9c6762e48b98f08a30011a (diff) |
write-cache: do not leak the serialized cache-tree data.
It is not used after getting written, and just is leaking every time
we write the index out.
Signed-off-by: Junio C Hamano <junkio@cox.net>
-rw-r--r-- | read-cache.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/read-cache.c b/read-cache.c index 8ecd826e9c..c54a611877 100644 --- a/read-cache.c +++ b/read-cache.c @@ -1010,7 +1010,7 @@ int write_cache(int newfd, struct cache_entry **cache, int entries) if (data && !write_index_ext_header(&c, newfd, CACHE_EXT_TREE, sz) && !ce_write(&c, newfd, data, sz)) - ; + free(data); else { free(data); return -1; |