Commit 80599b87 authored by Rich Prohaska's avatar Rich Prohaska Committed by Yoni Fogel

fix a memory leak in the cache table. addresses #1183

git-svn-id: file:///svn/toku/tokudb@9074 c7de825b-a66e-492c-adef-691d508d4ae1
parent e904ed90
......@@ -796,6 +796,7 @@ int toku_cachetable_get_and_pin(CACHEFILE cachefile, CACHEKEY key, u_int32_t ful
if (p->key.b==key.b && p->cachefile==cachefile) {
ctpair_read_lock(&p->rwlock, ct->mutex);
if (p->state == CTPAIR_INVALID) {
ctpair_read_unlock(&p->rwlock);
if (ctpair_users(&p->rwlock) == 0)
ctpair_destroy(p);
cachetable_unlock(ct);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment