[cfe-commits] r49057 - /cfe/trunk/lib/Analysis/GRSimpleVals.cpp

Ted Kremenek kremenek at apple.com
Tue Apr 1 15:35:58 PDT 2008


Author: kremenek
Date: Tue Apr  1 17:35:58 2008
New Revision: 49057

URL: http://llvm.org/viewvc/llvm-project?rev=49057&view=rev
Log:
Patch by Argiris Kirtzidis:  Fix a dangling pointer error!

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

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

==============================================================================
--- cfe/trunk/lib/Analysis/GRSimpleVals.cpp (original)
+++ cfe/trunk/lib/Analysis/GRSimpleVals.cpp Tue Apr  1 17:35:58 2008
@@ -76,10 +76,12 @@
                  ITERATOR I, ITERATOR E, const char* msg) {
  
   std::ostringstream Out;
+  std::string Str;
 
   if (!PD) {
     Out << "[CHECKER] " << msg;
-    msg = Out.str().c_str();
+    Str = Out.str();
+    msg = Str.c_str();
   }
   
   bool isFirst = true;





More information about the cfe-commits mailing list