aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ExecutionEngine/JIT/JITMemoryManager.cpp
diff options
context:
space:
mode:
authorNicolas Geoffray <nicolas.geoffray@lip6.fr>2009-10-22 14:35:57 +0000
committerNicolas Geoffray <nicolas.geoffray@lip6.fr>2009-10-22 14:35:57 +0000
commite369d54068dc4c4aaed61abf7ffeabd237719267 (patch)
tree7842f680c9381a20edb48d620839e6fc16e14ef4 /lib/ExecutionEngine/JIT/JITMemoryManager.cpp
parented248f3628f79be217ec9403c66f7bed2e31bde2 (diff)
downloadexternal_llvm-e369d54068dc4c4aaed61abf7ffeabd237719267.zip
external_llvm-e369d54068dc4c4aaed61abf7ffeabd237719267.tar.gz
external_llvm-e369d54068dc4c4aaed61abf7ffeabd237719267.tar.bz2
Verify that the function and exception table have been allocated
before freeing them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84859 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine/JIT/JITMemoryManager.cpp')
-rw-r--r--lib/ExecutionEngine/JIT/JITMemoryManager.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ExecutionEngine/JIT/JITMemoryManager.cpp b/lib/ExecutionEngine/JIT/JITMemoryManager.cpp
index ea9d09f..3796624 100644
--- a/lib/ExecutionEngine/JIT/JITMemoryManager.cpp
+++ b/lib/ExecutionEngine/JIT/JITMemoryManager.cpp
@@ -490,13 +490,13 @@ namespace {
/// deallocateFunctionBody - Deallocate all memory for the specified
/// function body.
void deallocateFunctionBody(void *Body) {
- deallocateBlock(Body);
+ if (Body) deallocateBlock(Body);
}
/// deallocateExceptionTable - Deallocate memory for the specified
/// exception table.
void deallocateExceptionTable(void *ET) {
- deallocateBlock(ET);
+ if (ET) deallocateBlock(ET);
}
/// setMemoryWritable - When code generation is in progress,