diff --git a/bluetooth/1.0/default/vendor_interface.cc b/bluetooth/1.0/default/vendor_interface.cc index e5f02f3793..d56e344e74 100644 --- a/bluetooth/1.0/default/vendor_interface.cc +++ b/bluetooth/1.0/default/vendor_interface.cc @@ -294,6 +294,7 @@ void VendorInterface::Close() { lib_interface_->op(BT_VND_OP_POWER_CTRL, &power_state); lib_interface_->cleanup(); + lib_interface_ = nullptr; } if (lib_handle_ != nullptr) { diff --git a/bluetooth/1.0/default/vendor_interface.h b/bluetooth/1.0/default/vendor_interface.h index 36f4e1b08e..1d69040d90 100644 --- a/bluetooth/1.0/default/vendor_interface.h +++ b/bluetooth/1.0/default/vendor_interface.h @@ -58,15 +58,15 @@ class VendorInterface { void HandleIncomingEvent(const hidl_vec& hci_packet); - void* lib_handle_; - bt_vendor_interface_t* lib_interface_; + void* lib_handle_ = nullptr; + bt_vendor_interface_t* lib_interface_ = nullptr; async::AsyncFdWatcher fd_watcher_; InitializeCompleteCallback initialize_complete_cb_; - hci::HciProtocol* hci_; + hci::HciProtocol* hci_ = nullptr; PacketReadCallback event_cb_; - FirmwareStartupTimer* firmware_startup_timer_; + FirmwareStartupTimer* firmware_startup_timer_ = nullptr; }; } // namespace implementation