[cfe-commits] r64044 - /cfe/trunk/lib/Analysis/CFRefCount.cpp

Ted Kremenek kremenek at apple.com
Sat Feb 7 14:54:59 PST 2009


Author: kremenek
Date: Sat Feb  7 16:54:59 2009
New Revision: 64044

URL: http://llvm.org/viewvc/llvm-project?rev=64044&view=rev
Log:
Fix null dereference.

Modified:
    cfe/trunk/lib/Analysis/CFRefCount.cpp

Modified: cfe/trunk/lib/Analysis/CFRefCount.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/CFRefCount.cpp?rev=64044&r1=64043&r2=64044&view=diff

==============================================================================
--- cfe/trunk/lib/Analysis/CFRefCount.cpp (original)
+++ cfe/trunk/lib/Analysis/CFRefCount.cpp Sat Feb  7 16:54:59 2009
@@ -2544,8 +2544,11 @@
   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() << '\'';
 }
 
 //===----------------------------------------------------------------------===//





More information about the cfe-commits mailing list