diff options
author | Ted Kremenek <kremenek@apple.com> | 2012-04-02 21:55:06 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2012-04-02 21:55:06 +0000 |
commit | d9b795524eb3dc035523f82f135d0a8adf15cd72 (patch) | |
tree | 567b24120ef5c2659d88901ac66c2f47318b58fc /lib/StaticAnalyzer/Core | |
parent | f30c0a97d9addc72a4928b8bb2039b2b464e1f94 (diff) |
Fix potential null dereference in the static analyzer when inlining a call that has already been inlined. Unfortunately I have no test case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153900 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Core')
-rw-r--r-- | lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp b/lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp index 0440ca953a..272f13eb6b 100644 --- a/lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp +++ b/lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp @@ -202,10 +202,11 @@ bool ExprEngine::InlineCall(ExplodedNodeSet &Dst, CallEnter Loc(CE, CalleeSFC, Pred->getLocationContext()); bool isNew; - ExplodedNode *N = G.getNode(Loc, state, false, &isNew); - N->addPredecessor(Pred, G); - if (isNew) - Engine.getWorkList()->enqueue(N); + if (ExplodedNode *N = G.getNode(Loc, state, false, &isNew)) { + N->addPredecessor(Pred, G); + if (isNew) + Engine.getWorkList()->enqueue(N); + } return true; } } |