mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Fix memory leak on Alter_drop allocation
Fixes 7f613ebdb6
(MDEV-7284 INDEX: CREATE OR REPLACE).
This commit is contained in:
@ -6719,7 +6719,7 @@ remove_key:
|
||||
DBUG_ASSERT(key->or_replace());
|
||||
Alter_drop::drop_type type= (key->type == Key::FOREIGN_KEY) ?
|
||||
Alter_drop::FOREIGN_KEY : Alter_drop::KEY;
|
||||
Alter_drop *ad= new Alter_drop(type, key->name.str, FALSE);
|
||||
Alter_drop *ad= new (thd->mem_root) Alter_drop(type, key->name.str, FALSE);
|
||||
if (ad != NULL)
|
||||
{
|
||||
// Adding the index into the drop list for replacing
|
||||
|
Reference in New Issue
Block a user