mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-01 13:20:25 +00:00
[LTO] Don't leak BitcodeFiles. Found by the asan bot.
llvm-svn: 286194
This commit is contained in:
parent
089f0e7488
commit
ba8761bc7f
@ -839,7 +839,7 @@ static bool isBitcode(MemoryBufferRef MB) {
|
||||
InputFile *elf::createObjectFile(MemoryBufferRef MB, StringRef ArchiveName,
|
||||
uint64_t OffsetInArchive) {
|
||||
InputFile *F =
|
||||
isBitcode(MB) ? new BitcodeFile(MB) : createELFFile<ObjectFile>(MB);
|
||||
isBitcode(MB) ? make<BitcodeFile>(MB) : createELFFile<ObjectFile>(MB);
|
||||
F->ArchiveName = ArchiveName;
|
||||
F->OffsetInArchive = OffsetInArchive;
|
||||
return F;
|
||||
|
Loading…
Reference in New Issue
Block a user