From: Ted Kremenek Date: Thu, 4 Dec 2008 22:09:37 +0000 (+0000) Subject: Use 'free' to release PerIDCache since it was allocated using calloc(). X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=271b7af521b784ec505a37a29ac36ec596954a08;p=clang Use 'free' to release PerIDCache since it was allocated using calloc(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60556 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Lex/PTHLexer.cpp b/lib/Lex/PTHLexer.cpp index 63f2722e99..85d009b4cb 100644 --- a/lib/Lex/PTHLexer.cpp +++ b/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) {