mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-21 18:29:46 +00:00
Quick fix for an use after free.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216071 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0ea6d4421c
commit
4b67b5a958
@ -529,6 +529,7 @@ int main(int argc, char **argv, char * const *envp) {
|
||||
EE->addModule(std::move(XMod));
|
||||
}
|
||||
|
||||
std::vector<std::unique_ptr<MemoryBuffer>> Buffers;
|
||||
for (unsigned i = 0, e = ExtraObjects.size(); i != e; ++i) {
|
||||
ErrorOr<object::OwningBinary<object::ObjectFile>> Obj =
|
||||
object::ObjectFile::createObjectFile(ExtraObjects[i]);
|
||||
@ -536,7 +537,9 @@ int main(int argc, char **argv, char * const *envp) {
|
||||
Err.print(argv[0], errs());
|
||||
return 1;
|
||||
}
|
||||
EE->addObjectFile(std::move(Obj.get().getBinary()));
|
||||
object::OwningBinary<object::ObjectFile> &O = Obj.get();
|
||||
EE->addObjectFile(std::move(O.getBinary()));
|
||||
Buffers.push_back(std::move(O.getBuffer()));
|
||||
}
|
||||
|
||||
for (unsigned i = 0, e = ExtraArchives.size(); i != e; ++i) {
|
||||
|
Loading…
Reference in New Issue
Block a user