r207262 - Fix leak of GlobalModuleIndex::IdentifierIndex, found by LSan.

Nico Weber nicolasweber at gmx.de
Fri Apr 25 12:45:24 PDT 2014


Author: nico
Date: Fri Apr 25 14:45:23 2014
New Revision: 207262

URL: http://llvm.org/viewvc/llvm-project?rev=207262&view=rev
Log:
Fix leak of GlobalModuleIndex::IdentifierIndex, found by LSan.

Modified:
    cfe/trunk/lib/Serialization/GlobalModuleIndex.cpp

Modified: cfe/trunk/lib/Serialization/GlobalModuleIndex.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/GlobalModuleIndex.cpp?rev=207262&r1=207261&r2=207262&view=diff
==============================================================================
--- cfe/trunk/lib/Serialization/GlobalModuleIndex.cpp (original)
+++ cfe/trunk/lib/Serialization/GlobalModuleIndex.cpp Fri Apr 25 14:45:23 2014
@@ -228,7 +228,9 @@ GlobalModuleIndex::GlobalModuleIndex(llv
   }
 }
 
-GlobalModuleIndex::~GlobalModuleIndex() { }
+GlobalModuleIndex::~GlobalModuleIndex() {
+  delete static_cast<IdentifierIndexTable *>(IdentifierIndex);
+}
 
 std::pair<GlobalModuleIndex *, GlobalModuleIndex::ErrorCode>
 GlobalModuleIndex::readIndex(StringRef Path) {





More information about the cfe-commits mailing list