From 51adb568d44540a33743dc8513053b49321f1f4c Mon Sep 17 00:00:00 2001 From: Martin Nowack Date: Tue, 13 Aug 2013 16:29:29 +0200 Subject: Free used constants if not used anymore Fixes memleak --- lib/Module/KModule.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/Module') 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::iterator it=constantMap.begin(), + itE=constantMap.end(); it!=itE;++it) + delete it->second; + delete targetData; delete module; } -- cgit 1.4.1