Re: [PATCH 1/2] read-cache: fix memleak

2015-03-23 Thread Junio C Hamano
Stefan Beller writes: > `ce` is allocated in make_cache_entry and should be freed if it is not > used any more. refresh_cache_entry as a wrapper around refresh_cache_ent > will either return `ce` or a new updated cache entry which is allocated > to new memory. In that case we need to free `ce` ou

[PATCH 1/2] read-cache: fix memleak

2015-03-23 Thread Stefan Beller
`ce` is allocated in make_cache_entry and should be freed if it is not used any more. refresh_cache_entry as a wrapper around refresh_cache_ent will either return `ce` or a new updated cache entry which is allocated to new memory. In that case we need to free `ce` ourselfs. Helped-by: Junio C Hama