1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

Fixed memory leak (found by rpl_row_inexist_tbl)

This commit is contained in:
monty@mysql.com
2006-06-23 10:35:45 +03:00
parent fba475cc47
commit 7ec5a7ecc5
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)