summaryrefslogtreecommitdiff
path: root/read-cache.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-07-19 17:39:01 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-07-19 17:39:01 (GMT)
commit65ed8684c4ef5a36f2d172f1cb8b88d993c0e4ec (patch)
treecbf7776dfc7532568d0eba3fea3ff662c31b3d8c /read-cache.c
parent7f05e4a6173e65220c11ed2ff42fa3d64ccd98a4 (diff)
parenta0fc4db01dfa69d836dc6f24218974a674ec29ac (diff)
downloadgit-65ed8684c4ef5a36f2d172f1cb8b88d993c0e4ec.zip
git-65ed8684c4ef5a36f2d172f1cb8b88d993c0e4ec.tar.gz
git-65ed8684c4ef5a36f2d172f1cb8b88d993c0e4ec.tar.bz2
Merge branch 'rs/discard-index-discard-array' into maint
* 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 7040e79..d97e3bf 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -1518,8 +1518,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;
}