summaryrefslogtreecommitdiff
path: root/read-cache.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-06-20 16:02:30 -0700
committerJunio C Hamano <gitster@pobox.com>2013-06-20 16:02:30 -0700
commit08bcd774f497af594f16e545a04e2ad767cc850d (patch)
treed7556b22e88d4b72666bb594a1e979fd4f162036 /read-cache.c
parent8f0c843aab226225b8ef43e9b2e317bda5ea8f6d (diff)
parenta0fc4db01dfa69d836dc6f24218974a674ec29ac (diff)
downloadgit-08bcd774f497af594f16e545a04e2ad767cc850d.tar.gz
Merge branch 'rs/discard-index-discard-array'
* rs/discard-index-discard-array: read-cache: free cache in discard_index read-cache: add simple performance test
Diffstat (limited to 'read-cache.c')
-rw-r--r--read-cache.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/read-cache.c b/read-cache.c
index 5e30746886..b297addb57 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -1520,8 +1520,9 @@ int discard_index(struct index_state *istate)
free_name_hash(istate);
cache_tree_free(&(istate->cache_tree));
istate->initialized = 0;
-
- /* no need to throw away allocated active_cache */
+ free(istate->cache);
+ istate->cache = NULL;
+ istate->cache_alloc = 0;
return 0;
}