Commit 3af116f1 authored by unknown's avatar unknown
Browse files

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
parent 00cfd1a7
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -111,8 +111,12 @@ SimBlockList::unload(){
  if(theList != 0){
    for(int i = 0; i<noOfBlocks; i++){
      if(theList[i] != 0){
#ifdef VM_TRACE
	theList[i]->~SimulatedBlock();
	free(theList[i]);
#else
        delete(theList[i]);
#endif
	theList[i] = 0;
      }
    }