object is never deleted though.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28256
91177308-0d34-0410-b5e6-
96231b3b80d8
// Allocate the GOT.
GOTBase = NULL;
- if (useGOT) GOTBase = (unsigned char*)malloc(sizeof(void*) * 8192);
+ if (useGOT) GOTBase = new unsigned char[sizeof(void*) * 8192];
}
JITMemoryManager::~JITMemoryManager() {
for (unsigned i = 0, e = Blocks.size(); i != e; ++i)
sys::Memory::ReleaseRWX(Blocks[i]);
+
+ delete[] GOTBase;
Blocks.clear();
}