Commit 8a376ae2 authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

LPBUG#782223 : Memory released by Query_cache::resize() or Query_cache::free()...

LPBUG#782223 : Memory released by Query_cache::resize() or Query_cache::free() contains active rwlocks.
The bug was found by application verifier. 
Fixed by destroying locks prior to free(),
parent 218c7665
......@@ -2253,6 +2253,18 @@ void Query_cache::free_cache()
{
DBUG_ENTER("Query_cache::free_cache");
/* Destroy locks */
Query_cache_block *block= queries_blocks;
if (block)
{
do
{
Query_cache_query *query= block->query();
my_rwlock_destroy(&query->lock);
block= block->next;
} while (block != queries_blocks);
}
my_free((uchar*) cache, MYF(MY_ALLOW_ZERO_PTR));
make_disabled();
hash_free(&queries);
......
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