1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-24 18:56:13 +02:00

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>
This commit is contained in:
Linus Torvalds 2007-01-11 12:25:16 -08:00 committed by Junio C Hamano
parent 2a3a3c247e
commit 2cdf9509df

View File

@ -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;