diff options
author | Cristian Cadar <c.cadar@imperial.ac.uk> | 2013-12-05 09:15:53 -0800 |
---|---|---|
committer | Cristian Cadar <c.cadar@imperial.ac.uk> | 2013-12-05 09:15:53 -0800 |
commit | 6d19d31eed55e18709c95363beafe8f679d6070c (patch) | |
tree | 945280a95c48b1e89061d6fd303beed1c5692257 /lib/Module | |
parent | 7c415a118f1bfc291cc6f2479b78db8041db95a4 (diff) | |
parent | 29c87addb0bf80baafc5f561cb68509a70a5b1c5 (diff) | |
download | klee-6d19d31eed55e18709c95363beafe8f679d6070c.tar.gz |
Merge pull request #11 from MartinNowack/Memleaks
Patch Set II - Memleaks
Diffstat (limited to 'lib/Module')
-rw-r--r-- | lib/Module/KModule.cpp | 4 | ||||
-rw-r--r-- | lib/Module/Passes.h | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/lib/Module/KModule.cpp b/lib/Module/KModule.cpp index ff13efda..7b23a9c9 100644 --- a/lib/Module/KModule.cpp +++ b/lib/Module/KModule.cpp @@ -127,6 +127,10 @@ KModule::~KModule() { ie = functions.end(); it != ie; ++it) delete *it; + for (std::map<llvm::Constant*, KConstant*>::iterator it=constantMap.begin(), + itE=constantMap.end(); it!=itE;++it) + delete it->second; + delete targetData; delete module; } diff --git a/lib/Module/Passes.h b/lib/Module/Passes.h index 0c294daa..c6e09f0f 100644 --- a/lib/Module/Passes.h +++ b/lib/Module/Passes.h @@ -64,7 +64,7 @@ public: #if LLVM_VERSION_CODE < LLVM_VERSION(2, 8) RaiseAsmPass() : llvm::ModulePass((intptr_t) &ID) {} #else - RaiseAsmPass() : llvm::ModulePass(ID) {} + RaiseAsmPass() : llvm::ModulePass(ID), TLI(0) {} #endif virtual bool runOnModule(llvm::Module &M); |