From c14d9c21f0a6974d9909e00a23522114caad3bfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lindstr=C3=B6m?= Date: Wed, 18 Mar 2015 06:25:10 +0200 Subject: [PATCH] Make sure that sync level vector is emptied. --- storage/innobase/sync/sync0sync.cc | 1 + storage/xtradb/sync/sync0sync.cc | 1 + 2 files changed, 2 insertions(+) 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; }