Re: [PATCH v4 14/14] read-cache.c: fix memory leaks caused by removed cache entries

2013-11-07 Thread Junio C Hamano
Karsten Blees writes: > diff --git a/builtin/update-index.c b/builtin/update-index.c > index b654d27..acd992d 100644 > --- a/builtin/update-index.c > +++ b/builtin/update-index.c > @@ -559,6 +559,7 @@ static int do_reupdate(int ac, const char **av, > const struct cache_entry *ce = a

[PATCH v4 14/14] read-cache.c: fix memory leaks caused by removed cache entries

2013-11-07 Thread Karsten Blees
When cache_entry structs are removed from index_state.cache, they are not properly freed. Freeing those entries wasn't possible before because we couldn't remove them from index_state.name_hash. Now that we _do_ remove the entries from name_hash, we can also free them. Add 'free(cache_entry)' to a