[Modules] Free modules that failed signature verification.

The control flow and ownership is weird enough so unique_ptr doesn't help here :(

llvm-svn: 220569
This commit is contained in:
Benjamin Kramer
2014-10-24 16:31:42 +00:00
parent e2e25da4b6
commit 5e3a421bfc

View File

@@ -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;
}
}