Skip to content
Snippets Groups Projects
Commit 65e154c9 authored by Chris Manton's avatar Chris Manton
Browse files

Revert "Defer free in bta_hh_act.cc"

This reverts commit cde75cf5.

Bug: 249815584

Reason for revert: ag/249815584 Breaks P1 feature

Change-Id: Ia146484522ba0eab118e74c65122bc1cd1a5f2a0
parent ccf02490
No related branches found
No related tags found
No related merge requests found
......@@ -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,9 +757,7 @@ 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);
}
osi_free_and_reset((void**)&pdata);
}
/*******************************************************************************
......
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment