diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-04-01 22:35:58 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-04-01 22:35:58 +0000 |
commit | a6fb4e07ed2e9145596490240faa1eebff5a53c0 (patch) | |
tree | 5a02757ca6de7b3968b33c72012f850557d45889 | |
parent | c052046348e696343f877cbbd19278231afebabc (diff) |
Patch by Argiris Kirtzidis: Fix a dangling pointer error!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49057 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Analysis/GRSimpleVals.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Analysis/GRSimpleVals.cpp b/lib/Analysis/GRSimpleVals.cpp index a99cf31215..5944c12e58 100644 --- a/lib/Analysis/GRSimpleVals.cpp +++ b/lib/Analysis/GRSimpleVals.cpp @@ -76,10 +76,12 @@ void EmitWarning(Diagnostic& Diag, PathDiagnosticClient* PD, 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; |