forked from OSchip/llvm-project
[ELF] Fix memory leak in BinaryFile handling.
llvm-svn: 281129
This commit is contained in:
parent
3354f42ae7
commit
0cb8a70adc
|
@ -55,6 +55,7 @@ void SymbolTable<ELFT>::addFile(std::unique_ptr<InputFile> File) {
|
|||
|
||||
// Binary file
|
||||
if (auto *F = dyn_cast<BinaryFile>(FileP)) {
|
||||
BinaryFiles.emplace_back(cast<BinaryFile>(File.release()));
|
||||
addFile(F->createELF<ELFT>());
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -127,6 +127,7 @@ private:
|
|||
|
||||
// The symbol table owns all file objects.
|
||||
std::vector<std::unique_ptr<ArchiveFile>> ArchiveFiles;
|
||||
std::vector<std::unique_ptr<BinaryFile>> BinaryFiles;
|
||||
std::vector<std::unique_ptr<ObjectFile<ELFT>>> ObjectFiles;
|
||||
std::vector<std::unique_ptr<LazyObjectFile>> LazyObjectFiles;
|
||||
std::vector<std::unique_ptr<SharedFile<ELFT>>> SharedFiles;
|
||||
|
|
Loading…
Reference in New Issue