From 8945e7c56ce136b544a65d583474cb30e58f5ad5 Mon Sep 17 00:00:00 2001 From: trevor_hansen Date: Fri, 28 Aug 2009 12:42:32 +0000 Subject: [PATCH] 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 --- src/AST/ToCNF.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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++) -- 2.47.3