diff options
author | Kelvin Zhang <zhangkelvin@google.com> | 2021-04-02 13:19:40 -0400 |
---|---|---|
committer | Yifan Hong <elsk@google.com> | 2021-04-02 21:54:38 +0000 |
commit | 28d49bc3153891ac0a3f10e5496376063f7eec76 (patch) | |
tree | 1cc3661b74a2350fe9f50d32004d816382f3a82b | |
parent | 1205ea684e81a6f14db7d5556f3eda2fd014b8d8 (diff) | |
download | update_engine-28d49bc3153891ac0a3f10e5496376063f7eec76.tar.gz |
Fix a potential wild pointer error when markSlotSuccessful comes late
Bug: 178637306
Bug: 169436297
Test: make boot control's IsSlotMarkedSuccessful always return false,
launch update_engine
Change-Id: I12c01c5f062ec4b41718f2cada817f6557eb2b0e
Merged-In: I12c01c5f062ec4b41718f2cada817f6557eb2b0e
-rw-r--r-- | cleanup_previous_update_action.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/cleanup_previous_update_action.cc b/cleanup_previous_update_action.cc index 88dbc57e..9f84c3bd 100644 --- a/cleanup_previous_update_action.cc +++ b/cleanup_previous_update_action.cc @@ -153,6 +153,7 @@ void CleanupPreviousUpdateAction::CheckSlotMarkedSuccessfulOrSchedule() { if (!kIsRecovery && !boot_control_->IsSlotMarkedSuccessful(boot_control_->GetCurrentSlot())) { ScheduleWaitMarkBootSuccessful(); + return; } if (metadata_device_ == nullptr) { |