diff options
-rw-r--r-- | compiler/elf_writer_quick.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/elf_writer_quick.cc b/compiler/elf_writer_quick.cc index e88ed42..09f2eae 100644 --- a/compiler/elf_writer_quick.cc +++ b/compiler/elf_writer_quick.cc @@ -739,8 +739,8 @@ bool ElfWriterQuick::Write(OatWriter* oat_writer, << " for " << elf_file_->GetPath(); return false; } - BufferedOutputStream output_stream(new FileOutputStream(elf_file_)); - if (!oat_writer->Write(&output_stream)) { + std::unique_ptr<BufferedOutputStream> output_stream(new BufferedOutputStream(new FileOutputStream(elf_file_))); + if (!oat_writer->Write(output_stream.get())) { PLOG(ERROR) << "Failed to write .rodata and .text for " << elf_file_->GetPath(); return false; } |