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 | 3b008eecf4abac73cc7cf3093022ecc6a00db497 (patch) | |
| tree | d205835adb3d6b43241cbb577b5a72cdf34fb95d | |
| parent | 98bcde42644c4bb731c4d6edeceae8ab9a18bd57 (diff) | |
| download | bcm5719-llvm-3b008eecf4abac73cc7cf3093022ecc6a00db497.tar.gz bcm5719-llvm-3b008eecf4abac73cc7cf3093022ecc6a00db497.zip | |
Fix potential null dereference in the static analyzer when inlining a call that has already been inlined. Unfortunately I have no test case.
llvm-svn: 153900
| -rw-r--r-- | clang/lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp b/clang/lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp index 0440ca953a7..272f13eb6b0 100644 --- a/clang/lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp +++ b/clang/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; } } |

