From: Ted Kremenek Date: Wed, 13 Aug 2008 03:10:52 +0000 (+0000) Subject: Fix memory leak found by Sam Bishop: delete WList in the dstor of GRCoreEngineImpl. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5c135b47d0fcdc33c912c4ed2ea750bdd6064da3;p=clang Fix memory leak found by Sam Bishop: delete WList in the dstor of GRCoreEngineImpl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54714 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Analysis/PathSensitive/GRCoreEngine.h b/include/clang/Analysis/PathSensitive/GRCoreEngine.h index 16f79856ba..013a315376 100644 --- a/include/clang/Analysis/PathSensitive/GRCoreEngine.h +++ b/include/clang/Analysis/PathSensitive/GRCoreEngine.h @@ -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(); } }; diff --git a/lib/Analysis/GRCoreEngine.cpp b/lib/Analysis/GRCoreEngine.cpp index 548c4bf161..1c64c28c37 100644 --- a/lib/Analysis/GRCoreEngine.cpp +++ b/lib/Analysis/GRCoreEngine.cpp @@ -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) {