From d364fc8db511e1123b6aa74a9a6c1b12b0a774b4 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Fri, 24 Oct 2014 16:31:42 +0000 Subject: [PATCH] [Modules] Free modules that failed signature verification. The control flow and ownership is weird enough so unique_ptr doesn't help here :( git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220569 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Serialization/ModuleManager.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Serialization/ModuleManager.cpp b/lib/Serialization/ModuleManager.cpp index 300ef31b59..c76a318805 100644 --- a/lib/Serialization/ModuleManager.cpp +++ b/lib/Serialization/ModuleManager.cpp @@ -145,6 +145,7 @@ ModuleManager::addModule(StringRef FileName, ModuleKind Type, // module is *itself* up to date, but has an out-of-date importer. Modules.erase(Entry); Chain.pop_back(); + delete New; return OutOfDate; } } -- 2.50.1