diff options
author | Kelvin Zhang <zhangkelvin@google.com> | 2021-04-02 13:19:40 -0400 |
---|---|---|
committer | Kelvin Zhang <zhangkelvin@google.com> | 2021-04-02 14:57:57 -0400 |
commit | 65e8b6c19582f196dfab67d12cc3af78bb8d138c (patch) | |
tree | ad073317d32336fa9a39e8632a51a414234d43fd | |
parent | bec0f07516656d2964df26a59ae67a4aa97097c9 (diff) |
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
-rw-r--r-- | aosp/cleanup_previous_update_action.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/aosp/cleanup_previous_update_action.cc b/aosp/cleanup_previous_update_action.cc index b4475098..ae2727a8 100644 --- a/aosp/cleanup_previous_update_action.cc +++ b/aosp/cleanup_previous_update_action.cc @@ -207,6 +207,7 @@ void CleanupPreviousUpdateAction::CheckSlotMarkedSuccessfulOrSchedule() { if (!kIsRecovery && !boot_control_->IsSlotMarkedSuccessful(boot_control_->GetCurrentSlot())) { ScheduleWaitMarkBootSuccessful(); + return; } if (metadata_device_ == nullptr) { |