1
0
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:
unknown
2006-06-23 10:35:45 +03:00
parent feb578bebd
commit 1e4d1f9b29
2 changed files with 15 additions and 12 deletions

View File

@@ -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)