summaryrefslogtreecommitdiffstats
path: root/clang/lib/Lex/PTHLexer.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-12-04 22:09:37 +0000
committerTed Kremenek <kremenek@apple.com>2008-12-04 22:09:37 +0000
commitbaedbf47f6c7630e6eb396fcd10efbe873ee9a8b (patch)
tree09d2aeb4a1d0552ab0433ca36bf45b74f33dfe78 /clang/lib/Lex/PTHLexer.cpp
parent8c84d28250686ab1a5ce8947d74e2ae561f1cb7b (diff)
downloadbcm5719-llvm-baedbf47f6c7630e6eb396fcd10efbe873ee9a8b.tar.gz
bcm5719-llvm-baedbf47f6c7630e6eb396fcd10efbe873ee9a8b.zip
Use 'free' to release PerIDCache since it was allocated using calloc().
llvm-svn: 60556
Diffstat (limited to 'clang/lib/Lex/PTHLexer.cpp')
-rw-r--r--clang/lib/Lex/PTHLexer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Lex/PTHLexer.cpp b/clang/lib/Lex/PTHLexer.cpp
index 63f2722e99b..85d009b4cbb 100644
--- a/clang/lib/Lex/PTHLexer.cpp
+++ b/clang/lib/Lex/PTHLexer.cpp
@@ -244,7 +244,7 @@ PTHManager::PTHManager(const llvm::MemoryBuffer* buf, void* fileLookup,
PTHManager::~PTHManager() {
delete Buf;
delete (PTHFileLookup*) FileLookup;
- delete [] (IdentifierInfo**) PerIDCache;
+ assert(PerIDCache); free(PerIDCache);
}
PTHManager* PTHManager::Create(const std::string& file, Preprocessor& PP) {
OpenPOWER on IntegriCloud