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

Commit 4a7f4aca authored by Hemant Gupta's avatar Hemant Gupta Committed by android-build-merger
Browse files

HID: Prevent crash by Cancelling SDP during cleanup

am: 10008bcd

Change-Id: I6020ab9443f3e674511ef88116fcaa0ea9a727ba
parents 8753b903 10008bcd
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -429,7 +429,12 @@ void bta_hh_cleanup_disable(tBTA_HH_STATUS status) {
    osi_free_and_reset(
        (void**)&bta_hh_cb.kdev[xx].dscp_info.descriptor.dsc_list);
  }

  if (bta_hh_cb.p_disc_db) {
    /* Cancel SDP if it had been started. */
    (void)SDP_CancelServiceSearch (bta_hh_cb.p_disc_db);
    osi_free_and_reset((void**)&bta_hh_cb.p_disc_db);
  }

  if (bta_hh_cb.p_cback) {
    (*bta_hh_cb.p_cback)(BTA_HH_DISABLE_EVT, (tBTA_HH*)&status);