forked from OSchip/llvm-project
Fix an asan found leak.
I will make better use of std::unique_ptr in followup patch. llvm-svn: 256310
This commit is contained in:
parent
5f2c46d62e
commit
05b0375e93
|
@ -60,8 +60,10 @@ void SymbolTable<ELFT>::addFile(std::unique_ptr<InputFile> File) {
|
|||
if (auto *F = dyn_cast<SharedFile<ELFT>>(FileP)) {
|
||||
// DSOs are uniquified not by filename but by soname.
|
||||
F->parseSoName();
|
||||
if (!IncludedSoNames.insert(F->getSoName()).second)
|
||||
if (!IncludedSoNames.insert(F->getSoName()).second) {
|
||||
delete FileP;
|
||||
return;
|
||||
}
|
||||
|
||||
SharedFiles.emplace_back(F);
|
||||
F->parse();
|
||||
|
|
Loading…
Reference in New Issue