diff --git a/storage/innobase/sync/sync0sync.cc b/storage/innobase/sync/sync0sync.cc index d00aabd6ff1..e62e4e7bc30 100644 --- a/storage/innobase/sync/sync0sync.cc +++ b/storage/innobase/sync/sync0sync.cc @@ -1454,6 +1454,7 @@ sync_thread_level_arrays_free(void) /* If this slot was allocated then free the slot memory too. */ if (slot->levels != NULL) { + slot->levels->elems.erase(slot->levels->elems.begin(),slot->levels->elems.end()); free(slot->levels); slot->levels = NULL; } diff --git a/storage/xtradb/sync/sync0sync.cc b/storage/xtradb/sync/sync0sync.cc index 7e104202f36..fcc2e01c1f4 100644 --- a/storage/xtradb/sync/sync0sync.cc +++ b/storage/xtradb/sync/sync0sync.cc @@ -1580,6 +1580,7 @@ sync_thread_level_arrays_free(void) /* If this slot was allocated then free the slot memory too. */ if (slot->levels != NULL) { + slot->levels->elems.erase(slot->levels->elems.begin(),slot->levels->elems.end()); free(slot->levels); slot->levels = NULL; }