From fbba3c174ca9006db4ea9837ccb0294be1ea39d1 Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Fri, 25 Apr 2014 19:45:23 +0000 Subject: [PATCH] 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 --- lib/Serialization/GlobalModuleIndex.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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(IdentifierIndex); +} std::pair GlobalModuleIndex::readIndex(StringRef Path) { -- 2.40.0