From: trevor_hansen Date: Fri, 28 Aug 2009 12:42:32 +0000 (+0000) Subject: Fix a small (24 byte) memory leak per call to CNF generation. X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=8945e7c56ce136b544a65d583474cb30e58f5ad5;p=francis%2Fstp.git Fix a small (24 byte) memory leak per call to CNF generation. git-svn-id: https://stp-fast-prover.svn.sourceforge.net/svnroot/stp-fast-prover/trunk/stp@147 e59a4935-1847-0410-ae03-e826735625c1 --- diff --git a/src/AST/ToCNF.cpp b/src/AST/ToCNF.cpp index 822541e..eb1f24f 100644 --- a/src/AST/ToCNF.cpp +++ b/src/AST/ToCNF.cpp @@ -1719,7 +1719,10 @@ private: void cleanup(const ASTNode& varphi) { delete info[varphi]->clausespos; - info.erase(varphi); + CNFInfo* toDelete = info[varphi]; // get the thing to delete. + info.erase(varphi); // remove it from the hashtable + delete toDelete; + ASTNodeToCNFInfoMap::const_iterator it1 = info.begin(); for (; it1 != info.end(); it1++)