diff options
author | Andreas Gampe <agampe@google.com> | 2015-03-13 16:54:54 -0700 |
---|---|---|
committer | Andreas Gampe <agampe@google.com> | 2015-03-13 16:54:54 -0700 |
commit | 0b7fcf94bdf8880862eb305454714a72da04cedb (patch) | |
tree | 7ba7dc4a8c673a2a30c72c2cbf45b6d7c1490739 /compiler/image_writer.cc | |
parent | 2f709af007ea67ee8b6b8965a7ce313bcb6089d4 (diff) | |
download | art-0b7fcf94bdf8880862eb305454714a72da04cedb.zip art-0b7fcf94bdf8880862eb305454714a72da04cedb.tar.gz art-0b7fcf94bdf8880862eb305454714a72da04cedb.tar.bz2 |
ART: Fix missing Erase() in error case
Fixes an abort for unclosed file.
Change-Id: Iae46fd89724f6f77a2b0a8c40293532e56153c2e
Diffstat (limited to 'compiler/image_writer.cc')
-rw-r--r-- | compiler/image_writer.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/image_writer.cc b/compiler/image_writer.cc index c7f81ea..d238b2c 100644 --- a/compiler/image_writer.cc +++ b/compiler/image_writer.cc @@ -137,6 +137,7 @@ bool ImageWriter::Write(const std::string& image_filename, if (oat_file_ == nullptr) { PLOG(ERROR) << "Failed to open writable oat file " << oat_filename << " for " << oat_location << ": " << error_msg; + oat_file->Erase(); return false; } CHECK_EQ(class_linker->RegisterOatFile(oat_file_), oat_file_); |