Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2b5515a3 authored by Łukasz Rymanowski's avatar Łukasz Rymanowski
Browse files

vc: Fix null pointer dereference

Bug: 335730088
Test: atest bluetooth_vc_test
Flag: Exempt, trivial fix
Change-Id: Ic607aa03c866fc544193e78540c90bfb0fce3962
parent d89102b9
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -89,6 +89,12 @@ struct VolumeOperation {
  };

  ~VolumeOperation() {
    if (operation_timeout_ == nullptr) {
      log::warn("operation_timeout_ should not be null, id {}, device cnt {}",
                operation_id_, devices_.size());
      return;
    }

    if (alarm_is_scheduled(operation_timeout_))
      alarm_cancel(operation_timeout_);

+2 −0
Original line number Diff line number Diff line
@@ -681,6 +681,8 @@ class VolumeControlImpl : public VolumeControl {
      return;
    }

    log::info("{}", remote_bda);

    bool notify = device->IsReady() || device->connecting_actively;
    device_cleanup_helper(device, notify);