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

Commit 9a329334 authored by Chris Manton's avatar Chris Manton Committed by Automerger Merge Worker
Browse files

Revert "Defer free in bta_hh_act.cc" am: 65e154c9

parents 78759f18 65e154c9
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -706,7 +706,6 @@ void bta_hh_ctrl_dat_act(tBTA_HH_DEV_CB* p_cb, const tBTA_HH_DATA* p_data) {
  BT_HDR* pdata = p_data->hid_cback.p_data;
  uint8_t* data = (uint8_t*)(pdata + 1) + pdata->offset;
  tBTA_HH_HSDATA hs_data;
  bool do_free = true;

  APPL_TRACE_DEBUG("Ctrl DATA received w4: event[%s]",
                   bta_hh_get_w4_event(p_cb->w4_evt));
@@ -727,7 +726,6 @@ void bta_hh_ctrl_dat_act(tBTA_HH_DEV_CB* p_cb, const tBTA_HH_DATA* p_data) {
      hs_data.rsp_data.p_rpt_data = pdata;
      bta_hh_co_get_rpt_rsp(hs_data.handle, hs_data.status, pdata->data,
                            pdata->len);
      do_free = false;
      break;
    case BTA_HH_GET_PROTO_EVT:
      /* match up BTE/BTA report/boot mode def*/
@@ -759,10 +757,8 @@ void bta_hh_ctrl_dat_act(tBTA_HH_DEV_CB* p_cb, const tBTA_HH_DATA* p_data) {
  (*bta_hh_cb.p_cback)(p_cb->w4_evt, (tBTA_HH*)&hs_data);

  p_cb->w4_evt = 0;
  if (do_free) {
  osi_free_and_reset((void**)&pdata);
}
}

/*******************************************************************************
 *
+0 −4
Original line number Diff line number Diff line
@@ -893,10 +893,6 @@ static void btif_hh_upstreams_evt(uint16_t event, char* p_param) {
        BTIF_TRACE_WARNING("Error: cannot find device with handle %d",
                           p_data->hs_data.handle);
      }
      if (hdr) {
        osi_free(hdr);
        p_data->hs_data.rsp_data.p_rpt_data = NULL;
      }
      break;
    }