]> granicus.if.org Git - clang/commitdiff
[Modules] Free modules that failed signature verification.
authorBenjamin Kramer <benny.kra@googlemail.com>
Fri, 24 Oct 2014 16:31:42 +0000 (16:31 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Fri, 24 Oct 2014 16:31:42 +0000 (16:31 +0000)
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

index 300ef31b59004f0bbe0db620dd167a57be75346e..c76a318805eeb6151ad3ff8bbb224dc0afdfd6d3 100644 (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;
       }
     }