summaryrefslogtreecommitdiff
path: root/storage/xtradb/ha/ha0ha.cc
diff options
context:
space:
mode:
Diffstat (limited to 'storage/xtradb/ha/ha0ha.cc')
-rw-r--r--storage/xtradb/ha/ha0ha.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/storage/xtradb/ha/ha0ha.cc b/storage/xtradb/ha/ha0ha.cc
index b79ae922045..3674260f173 100644
--- a/storage/xtradb/ha/ha0ha.cc
+++ b/storage/xtradb/ha/ha0ha.cc
@@ -155,11 +155,15 @@ ha_clear(
switch (table->type) {
case HASH_TABLE_SYNC_MUTEX:
+ for (ulint i = 0; i < table->n_sync_obj; i++)
+ mutex_free(table->sync_obj.mutexes + i);
mem_free(table->sync_obj.mutexes);
table->sync_obj.mutexes = NULL;
break;
case HASH_TABLE_SYNC_RW_LOCK:
+ for (ulint i = 0; i < table->n_sync_obj; i++)
+ rw_lock_free(table->sync_obj.rw_locks + i);
mem_free(table->sync_obj.rw_locks);
table->sync_obj.rw_locks = NULL;
break;