diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-06-20 16:02:30 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-06-20 16:02:30 -0700 |
commit | 08bcd774f497af594f16e545a04e2ad767cc850d (patch) | |
tree | d7556b22e88d4b72666bb594a1e979fd4f162036 /read-cache.c | |
parent | 8f0c843aab226225b8ef43e9b2e317bda5ea8f6d (diff) | |
parent | a0fc4db01dfa69d836dc6f24218974a674ec29ac (diff) | |
download | git-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.c | 5 |
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; } |