diff options
Diffstat (limited to 'sql/lock.cc')
-rw-r--r-- | sql/lock.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/lock.cc b/sql/lock.cc index 7eb42f6b084..4c7ae8e950b 100644 --- a/sql/lock.cc +++ b/sql/lock.cc @@ -434,7 +434,10 @@ int lock_table_name(THD *thd, TABLE_LIST *table_list) table_list->table=table; if (hash_insert(&open_cache, (byte*) table)) + { + my_free((gptr) table,MYF(0)); DBUG_RETURN(-1); + } if (remove_table_from_cache(thd, table_list->db, table_list->name)) DBUG_RETURN(1); // Table is in use DBUG_RETURN(0); |