Re: [PATCH] read-cache.c: free cache entry when refreshing fails

2015-02-17 Thread Junio C Hamano
Stefan Beller writes: > This fixes a memory leak, when building the cache entries as > refresh_cache_entry may decide to return NULL in case of > in case of what? I briefly wondered if refresh_cache_ent() should do the freeing but that does not make sense at all if done unconditionally because

[PATCH] read-cache.c: free cache entry when refreshing fails

2015-02-17 Thread Stefan Beller
This fixes a memory leak, when building the cache entries as refresh_cache_entry may decide to return NULL in case of I am not sure how severe this memory leak is as it was found by scan.coverity.com, CID 290041. Signed-off-by: Stefan Beller --- read-cache.c | 10 -- 1 file changed, 8 i