Re: [patch] git: fix memory leak #2 in read-cache.c

2005-04-14 Thread Ingo Molnar
* Ingo Molnar [EMAIL PROTECTED] wrote: this patch fixes a memory leak in read-cache.c: when there's cache entry collision we should free the previous one. + free(active_cache[pos]); active_cache[pos] = ce; i'm having second thoughs about this one: active_cache

Re: [patch] git: fix memory leak #2 in read-cache.c

2005-04-14 Thread Ingo Molnar
* Linus Torvalds [EMAIL PROTECTED] wrote: In other words, if the common case is that we update a couple of entries in the active cache, we actually saved 1.6MB (+ malloc overhead for the 17 _thousand_ allocations) by my approach. And the leak? There's none. We never actually update an