diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-11-13 03:02:57 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-11-13 03:02:57 +0000 |
commit | cca5e1ea18e40dd17e25c0fa9d64a5bc6f34a36a (patch) | |
tree | 5d05519f22b126afcb7f6a391ca4d7f0ba83dda2 | |
parent | 92774d1051f5315052fd63d39673c42c9c03a1c4 (diff) |
Fix recently introduced use-after-free error reported in <rdar://problem/7387478>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87072 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Frontend/HTMLDiagnostics.cpp | 2 | ||||
-rw-r--r-- | lib/Frontend/PlistDiagnostics.cpp | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/lib/Frontend/HTMLDiagnostics.cpp b/lib/Frontend/HTMLDiagnostics.cpp index 145d53f3fc..3ba7abf381 100644 --- a/lib/Frontend/HTMLDiagnostics.cpp +++ b/lib/Frontend/HTMLDiagnostics.cpp @@ -109,6 +109,8 @@ HTMLDiagnostics::FlushDiagnostics(llvm::SmallVectorImpl<std::string> *FilesMade) ReportDiag(*D, FilesMade); delete D; } + + BatchedDiags.clear(); } void HTMLDiagnostics::ReportDiag(const PathDiagnostic& D, diff --git a/lib/Frontend/PlistDiagnostics.cpp b/lib/Frontend/PlistDiagnostics.cpp index 1be9ea8b8c..8a12b53534 100644 --- a/lib/Frontend/PlistDiagnostics.cpp +++ b/lib/Frontend/PlistDiagnostics.cpp @@ -423,4 +423,6 @@ void PlistDiagnostics::FlushDiagnostics(llvm::SmallVectorImpl<std::string> if (FilesMade) FilesMade->push_back(OutputFile); + + BatchedDiags.clear(); } |