summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-08-13 03:10:52 +0000
committerTed Kremenek <kremenek@apple.com>2008-08-13 03:10:52 +0000
commit3f91f037a7e025c5934cc50a35d858744db3cad5 (patch)
treea0488dbc9869fbba5125058929db9823bdd6eb41 /clang
parent97387e6615c7e8fe8a941b2af4bfa6c5bdc5e5a9 (diff)
downloadbcm5719-llvm-3f91f037a7e025c5934cc50a35d858744db3cad5.tar.gz
bcm5719-llvm-3f91f037a7e025c5934cc50a35d858744db3cad5.zip
Fix memory leak found by Sam Bishop: delete WList in the dstor of GRCoreEngineImpl.
llvm-svn: 54714
Diffstat (limited to 'clang')
-rw-r--r--clang/include/clang/Analysis/PathSensitive/GRCoreEngine.h2
-rw-r--r--clang/lib/Analysis/GRCoreEngine.cpp3
2 files changed, 4 insertions, 1 deletions
diff --git a/clang/include/clang/Analysis/PathSensitive/GRCoreEngine.h b/clang/include/clang/Analysis/PathSensitive/GRCoreEngine.h
index 16f79856ba8..013a315376f 100644
--- a/clang/include/clang/Analysis/PathSensitive/GRCoreEngine.h
+++ b/clang/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/clang/lib/Analysis/GRCoreEngine.cpp b/clang/lib/Analysis/GRCoreEngine.cpp
index 548c4bf161c..1c64c28c37d 100644
--- a/clang/lib/Analysis/GRCoreEngine.cpp
+++ b/clang/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) {
OpenPOWER on IntegriCloud