this patch fixes a memory leak in read-cache.c: when there's cache entry 
collision we should free the previous one.


Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]>

--- read-cache.c.orig
+++ read-cache.c
@@ -369,6 +369,7 @@ int add_cache_entry(struct cache_entry *
        /* existing match? Just replace it */
        if (pos >= 0) {
+               free(active_cache[pos]);
                active_cache[pos] = ce;
                return 0;
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to