From 3af116f18795e8446c0baa460989be3af4512b53 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 6 Apr 2006 21:59:20 +1000 Subject: [PATCH] BUG#18833 valgrind: Mismatched free()/delete/delete[] in SimBlockList ndb/src/kernel/SimBlockList.cpp: NEW_BLOCK allocates the elements with new, we should free them with delete but only if we're not building with VM_TRACE --- ndb/src/kernel/SimBlockList.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ndb/src/kernel/SimBlockList.cpp b/ndb/src/kernel/SimBlockList.cpp index 6029fc7e225..271d515dc92 100644 --- a/ndb/src/kernel/SimBlockList.cpp +++ b/ndb/src/kernel/SimBlockList.cpp @@ -111,8 +111,12 @@ SimBlockList::unload(){ if(theList != 0){ for(int i = 0; i~SimulatedBlock(); free(theList[i]); +#else + delete(theList[i]); +#endif theList[i] = 0; } }