]> granicus.if.org Git - clang/commitdiff
Fix memory leak found by Sam Bishop: delete WList in the dstor of GRCoreEngineImpl.
authorTed Kremenek <kremenek@apple.com>
Wed, 13 Aug 2008 03:10:52 +0000 (03:10 +0000)
committerTed Kremenek <kremenek@apple.com>
Wed, 13 Aug 2008 03:10:52 +0000 (03:10 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54714 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Analysis/PathSensitive/GRCoreEngine.h
lib/Analysis/GRCoreEngine.cpp

index 16f79856ba8fea7303380bcfea91c88cb81bd213..013a315376f4d2d34ae9f4ba9a1fff3c1bd21f4d 100644 (file)
@@ -106,7 +106,7 @@ public:
   ///  steps.  Returns true if there is still simulation state on the worklist.
   bool ExecuteWorkList(unsigned Steps);
   
-  virtual ~GRCoreEngineImpl() {}
+  virtual ~GRCoreEngineImpl();
   
   CFG& getCFG() { return G->getCFG(); }
 };
index 548c4bf161c9bc5777b83e4b1c1528d607426b96..1c64c28c37d88e72aa1ae2d289676725ffc13d51 100644 (file)
@@ -156,6 +156,9 @@ void GRCoreEngineImpl::HandleBlockEntrance(const BlockEntrance& L,
     HandleBlockExit(L.getBlock(), Pred);
 }
 
+GRCoreEngineImpl::~GRCoreEngineImpl() {
+  delete WList;
+}
 
 void GRCoreEngineImpl::HandleBlockExit(CFGBlock * B, ExplodedNodeImpl* Pred) {