Fixed bug in GREndPathNodeBuilder: only return a node if it wasn't in the node cache.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49907 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Analysis/CFRefCount.cpp b/lib/Analysis/CFRefCount.cpp
index 1c2f20a..1618f04 100644
--- a/lib/Analysis/CFRefCount.cpp
+++ b/lib/Analysis/CFRefCount.cpp
@@ -1065,6 +1065,10 @@
}
ExplodedNode<ValueState>* N = Builder.MakeNode(St);
+
+ if (!N)
+ return;
+
std::vector<SymbolID>*& LeaksAtNode = Leaks[N];
assert (!LeaksAtNode);
LeaksAtNode = new std::vector<SymbolID>();