From ee8755e3c51a1da8fcf108ad0257a7e62fc94347 Mon Sep 17 00:00:00 2001 From: Oleksandr Byelkin Date: Wed, 24 Jan 2018 14:42:52 +0100 Subject: MDEV-15012: ASAN: numerous test failures in PS First roll back changes, then free Items which can lead to memory freeing. --- sql/sql_prepare.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sql/sql_prepare.cc') diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index faaeaf51573..a3bf9d6c93c 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -3230,9 +3230,9 @@ void Prepared_statement::cleanup_stmt() DBUG_ENTER("Prepared_statement::cleanup_stmt"); DBUG_PRINT("enter",("stmt: 0x%lx", (long) this)); + thd->rollback_item_tree_changes(); cleanup_items(free_list); thd->cleanup_after_query(); - thd->rollback_item_tree_changes(); DBUG_VOID_RETURN; } -- cgit v1.2.1