1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00

Fix a hypothetical memory leak, identified by Coverity. In practice, this

object is never deleted though.

llvm-svn: 28256
This commit is contained in:
Chris Lattner 2006-05-12 18:10:12 +00:00
parent 9e29384a4b
commit b1ad13a4bc

View File

@ -392,12 +392,14 @@ JITMemoryManager::JITMemoryManager(bool useGOT) {
// 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();
}