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(),
This commit is contained in:
parent
218c7665be
commit
8a376ae237
@ -2253,6 +2253,18 @@ void Query_cache::free_cache()
|
|||||||
{
|
{
|
||||||
DBUG_ENTER("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));
|
my_free((uchar*) cache, MYF(MY_ALLOW_ZERO_PTR));
|
||||||
make_disabled();
|
make_disabled();
|
||||||
hash_free(&queries);
|
hash_free(&queries);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user