mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Fixed memory leak (found by rpl_row_inexist_tbl)
sql/handler.cc: Made code more portable
This commit is contained in:
@@ -3268,10 +3268,11 @@ namespace
|
||||
|
||||
if (thd->get_binlog_table_maps() == 0)
|
||||
{
|
||||
MYSQL_LOCK *const locks[] = {
|
||||
thd->extra_lock, thd->lock, thd->locked_tables
|
||||
};
|
||||
for (my_ptrdiff_t i= 0 ; i < sizeof(locks)/sizeof(*locks) ; ++i )
|
||||
MYSQL_LOCK *locks[3];
|
||||
locks[0]= thd->extra_lock;
|
||||
locks[1]= thd->lock;
|
||||
locks[2]= thd->locked_tables;
|
||||
for (uint i= 0 ; i < sizeof(locks)/sizeof(*locks) ; ++i )
|
||||
{
|
||||
MYSQL_LOCK const *const lock= locks[i];
|
||||
if (lock == NULL)
|
||||
|
||||
Reference in New Issue
Block a user