summaryrefslogtreecommitdiff
path: root/storage/innodb_plugin/srv/srv0start.c
diff options
context:
space:
mode:
Diffstat (limited to 'storage/innodb_plugin/srv/srv0start.c')
-rw-r--r--storage/innodb_plugin/srv/srv0start.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/storage/innodb_plugin/srv/srv0start.c b/storage/innodb_plugin/srv/srv0start.c
index e517b9a86b0..ba9fc831b39 100644
--- a/storage/innodb_plugin/srv/srv0start.c
+++ b/storage/innodb_plugin/srv/srv0start.c
@@ -2018,9 +2018,13 @@ innobase_shutdown_for_mysql(void)
pars_lexer_close();
log_mem_free();
buf_pool_free();
- ut_free_all_mem();
mem_close();
+ /* ut_free_all_mem() frees all allocated memory not freed yet
+ in shutdown, and it will also free the ut_list_mutex, so it
+ should be the last one for all operation */
+ ut_free_all_mem();
+
if (os_thread_count != 0
|| os_event_count != 0
|| os_mutex_count != 0