Fixed bug in GREndPathNodeBuilder: only return a node if it wasn't in the node cache.

llvm-svn: 49907
This commit is contained in:
Ted Kremenek 2008-04-18 16:30:14 +00:00
parent b06817e914
commit d004c418b6
2 changed files with 6 additions and 1 deletions

View File

@ -1065,6 +1065,10 @@ void CFRefCount::EvalEndPath(GRExprEngine& Eng,
}
ExplodedNode<ValueState>* N = Builder.MakeNode(St);
if (!N)
return;
std::vector<SymbolID>*& LeaksAtNode = Leaks[N];
assert (!LeaksAtNode);
LeaksAtNode = new std::vector<SymbolID>();

View File

@ -456,7 +456,8 @@ ExplodedNodeImpl* GREndPathNodeBuilderImpl::generateNodeImpl(void* State) {
if (IsNew) {
Node->markAsSink();
Eng.G->addEndOfPath(Node);
return Node;
}
return Node;
return NULL;
}