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
This commit is contained in:
Ted Kremenek 2012-04-02 21:55:06 +00:00
parent 98bcde4264
commit 3b008eecf4
1 changed files with 5 additions and 4 deletions

View File

@ -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;
}
}