[cfe-commits] r60556 - /cfe/trunk/lib/Lex/PTHLexer.cpp

Ted Kremenek kremenek at apple.com
Thu Dec 4 14:09:37 PST 2008


Author: kremenek
Date: Thu Dec  4 16:09:37 2008
New Revision: 60556

URL: http://llvm.org/viewvc/llvm-project?rev=60556&view=rev
Log:
Use 'free' to release PerIDCache since it was allocated using calloc().

Modified:
    cfe/trunk/lib/Lex/PTHLexer.cpp

Modified: cfe/trunk/lib/Lex/PTHLexer.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/PTHLexer.cpp?rev=60556&r1=60555&r2=60556&view=diff

==============================================================================
--- cfe/trunk/lib/Lex/PTHLexer.cpp (original)
+++ cfe/trunk/lib/Lex/PTHLexer.cpp Thu Dec  4 16:09:37 2008
@@ -244,7 +244,7 @@
 PTHManager::~PTHManager() {
   delete Buf;
   delete (PTHFileLookup*) FileLookup;
-  delete [] (IdentifierInfo**) PerIDCache;
+  assert(PerIDCache); free(PerIDCache);
 }
 
 PTHManager* PTHManager::Create(const std::string& file, Preprocessor& PP) {





More information about the cfe-commits mailing list