diff options
-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 c7f81eab2f..d238b2cb05 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_); |