[cfe-commits] r54714 - in /cfe/trunk: include/clang/Analysis/PathSensitive/GRCoreEngine.h lib/Analysis/GRCoreEngine.cpp

Ted Kremenek kremenek at apple.com
Tue Aug 12 20:10:53 PDT 2008


Author: kremenek
Date: Tue Aug 12 22:10:52 2008
New Revision: 54714

URL: http://llvm.org/viewvc/llvm-project?rev=54714&view=rev
Log:
Fix memory leak found by Sam Bishop: delete WList in the dstor of GRCoreEngineImpl.

Modified:
    cfe/trunk/include/clang/Analysis/PathSensitive/GRCoreEngine.h
    cfe/trunk/lib/Analysis/GRCoreEngine.cpp

Modified: cfe/trunk/include/clang/Analysis/PathSensitive/GRCoreEngine.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/PathSensitive/GRCoreEngine.h?rev=54714&r1=54713&r2=54714&view=diff

==============================================================================
--- cfe/trunk/include/clang/Analysis/PathSensitive/GRCoreEngine.h (original)
+++ cfe/trunk/include/clang/Analysis/PathSensitive/GRCoreEngine.h Tue Aug 12 22:10:52 2008
@@ -106,7 +106,7 @@
   ///  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(); }
 };

Modified: cfe/trunk/lib/Analysis/GRCoreEngine.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/GRCoreEngine.cpp?rev=54714&r1=54713&r2=54714&view=diff

==============================================================================
--- cfe/trunk/lib/Analysis/GRCoreEngine.cpp (original)
+++ cfe/trunk/lib/Analysis/GRCoreEngine.cpp Tue Aug 12 22:10:52 2008
@@ -156,6 +156,9 @@
     HandleBlockExit(L.getBlock(), Pred);
 }
 
+GRCoreEngineImpl::~GRCoreEngineImpl() {
+  delete WList;
+}
 
 void GRCoreEngineImpl::HandleBlockExit(CFGBlock * B, ExplodedNodeImpl* Pred) {
   





More information about the cfe-commits mailing list