aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Serialization/GlobalModuleIndex.cpp
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2014-04-25 19:45:23 +0000
committerNico Weber <nicolasweber@gmx.de>2014-04-25 19:45:23 +0000
commite68b847fdb347f386e23ebd286dec115996440ee (patch)
tree133e9016f390a8c1355d7b3f31e4c0ba7d0fcfd1 /clang/lib/Serialization/GlobalModuleIndex.cpp
parent8dbcc3fe32432b2a9a1f808cb4a2a4abc8737cbe (diff)
downloadllvm-e68b847fdb347f386e23ebd286dec115996440ee.zip
llvm-e68b847fdb347f386e23ebd286dec115996440ee.tar.gz
llvm-e68b847fdb347f386e23ebd286dec115996440ee.tar.bz2
Fix leak of GlobalModuleIndex::IdentifierIndex, found by LSan.
llvm-svn: 207262
Diffstat (limited to 'clang/lib/Serialization/GlobalModuleIndex.cpp')
-rw-r--r--clang/lib/Serialization/GlobalModuleIndex.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Serialization/GlobalModuleIndex.cpp b/clang/lib/Serialization/GlobalModuleIndex.cpp
index 21a7149..04e4fb2 100644
--- a/clang/lib/Serialization/GlobalModuleIndex.cpp
+++ b/clang/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) {