aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/CFRefCount.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-02-07 22:54:59 +0000
committerTed Kremenek <kremenek@apple.com>2009-02-07 22:54:59 +0000
commitc5c6000fed2a337ba72812faf64a4a790ff8d9a0 (patch)
treee7e13b544c1f2843f6c1c66d3c8050c3f130d31a /lib/Analysis/CFRefCount.cpp
parent6ccc47698d0311ddabf32fa0f6db8e4f09ac96f8 (diff)
Fix null dereference.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64044 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/CFRefCount.cpp')
-rw-r--r--lib/Analysis/CFRefCount.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/Analysis/CFRefCount.cpp b/lib/Analysis/CFRefCount.cpp
index 8b3f37f1e5..662b2f5f97 100644
--- a/lib/Analysis/CFRefCount.cpp
+++ b/lib/Analysis/CFRefCount.cpp
@@ -2544,8 +2544,11 @@ CFRefLeakReport::CFRefLeakReport(CFRefBug& D, ExplodedNode<GRState> *n,
llvm::raw_string_ostream os(Description);
SourceManager& SMgr = Eng.getContext().getSourceManager();
unsigned AllocLine = SMgr.getInstantiationLineNumber(AllocSite);
- os << "Potential leak of object allocated on line " << AllocLine
- << " and store into '" << AllocBinding->getString() << '\'';
+ os << "Potential leak of object allocated on line " << AllocLine;
+
+ // FIXME: AllocBinding doesn't get populated for RegionStore yet.
+ if (AllocBinding)
+ os << " and store into '" << AllocBinding->getString() << '\'';
}
//===----------------------------------------------------------------------===//