]> granicus.if.org Git - clang/commitdiff
Fix leak of GlobalModuleIndex::IdentifierIndex, found by LSan.
authorNico Weber <nicolasweber@gmx.de>
Fri, 25 Apr 2014 19:45:23 +0000 (19:45 +0000)
committerNico Weber <nicolasweber@gmx.de>
Fri, 25 Apr 2014 19:45:23 +0000 (19:45 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207262 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Serialization/GlobalModuleIndex.cpp

index 21a714999b0c89cac5c860918e26b639203d4a0b..04e4fb2c020413ad9f1f234c45972ce81892cfdf 100644 (file)
@@ -228,7 +228,9 @@ GlobalModuleIndex::GlobalModuleIndex(llvm::MemoryBuffer *Buffer,
   }
 }
 
-GlobalModuleIndex::~GlobalModuleIndex() { }
+GlobalModuleIndex::~GlobalModuleIndex() {
+  delete static_cast<IdentifierIndexTable *>(IdentifierIndex);
+}
 
 std::pair<GlobalModuleIndex *, GlobalModuleIndex::ErrorCode>
 GlobalModuleIndex::readIndex(StringRef Path) {