1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

bug in JOIN_TAB::cleanup() that caused freed memory to be accessed

This commit is contained in:
Monty
2015-09-27 21:28:07 +02:00
committed by Sergei Golubchik
parent 4193fa7ae2
commit 8ed5fde3e1

View File

@ -11472,14 +11472,16 @@ void JOIN_TAB::cleanup()
}
else
{
TABLE_LIST *tmp= table->pos_in_table_list;
end_read_record(&read_record);
table->pos_in_table_list->jtbm_subselect->cleanup();
tmp->jtbm_subselect->cleanup();
/*
The above call freed the materializedd temptable. Set it to NULL so
that we don't attempt to touch it if JOIN_TAB::cleanup() is invoked
multiple times (it may be)
*/
table=NULL;
tmp->table= NULL;
table= NULL;
}
DBUG_VOID_RETURN;
}