diff options
author | Nico Weber <nicolasweber@gmx.de> | 2014-04-25 19:45:23 +0000 |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2014-04-25 19:45:23 +0000 |
commit | fbba3c174ca9006db4ea9837ccb0294be1ea39d1 (patch) | |
tree | ed5fef9a207a72c85d4f3408f7d348aa2cb5cdc7 | |
parent | 62034adc96e13107a6f07a3045e560c08165df8e (diff) | |
download | clang_35a-fbba3c174ca9006db4ea9837ccb0294be1ea39d1.tar.gz |
Fix leak of GlobalModuleIndex::IdentifierIndex, found by LSan.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207262 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Serialization/GlobalModuleIndex.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Serialization/GlobalModuleIndex.cpp b/lib/Serialization/GlobalModuleIndex.cpp index 21a714999b..04e4fb2c02 100644 --- a/lib/Serialization/GlobalModuleIndex.cpp +++ b/lib/Serialization/GlobalModuleIndex.cpp @@ -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) { |