commit | 253f8639dc915bf535145edea5ed40e63ef281e4 | [log] [tgz] |
---|---|---|
author | Kelvin Zhang <zhangkelvin@google.com> | Wed Jan 18 03:00:09 2023 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Wed Jan 18 03:00:09 2023 +0000 |
tree | f2b5a0ed023d7c1435638356517c6ef62c219411 | |
parent | a796eb516976969e6bafd85f7b9f5b29f4bb686b [diff] | |
parent | 6c0570668f1cadee582bc93b39155c85e60f6fa4 [diff] |
Fix crashes when OTA install fails on non-VABC partition am: 6c0570668f Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/2391313 Change-Id: Icde5becb1d0da18d4c84ec310844ad8b735929d5 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/payload_consumer/partition_writer.cc b/payload_consumer/partition_writer.cc index 3432c89..d7d8bea 100644 --- a/payload_consumer/partition_writer.cc +++ b/payload_consumer/partition_writer.cc
@@ -288,7 +288,9 @@ } void PartitionWriter::CheckpointUpdateProgress(size_t next_op_index) { - target_fd_->Flush(); + if (target_fd_) { + target_fd_->Flush(); + } } std::unique_ptr<ExtentWriter> PartitionWriter::CreateBaseExtentWriter() {