Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
write-cache: do not leak the serialized cache-tree data.
author
Linus Torvalds
<torvalds@osdl.org>
Thu, 11 Jan 2007 20:25:16 +0000
(12:25 -0800)
committer
Junio C Hamano
<junkio@cox.net>
Thu, 11 Jan 2007 20:25:16 +0000
(12:25 -0800)
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>
read-cache.c
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
2a3a3c2
)
diff --git
a/read-cache.c
b/read-cache.c
index 8ecd826e9c628346365cfd8c913c7a20af0fc76e..c54a61187711087b98138b9598db6353457e4df3 100644
(file)
--- 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;