tBTA_HL_MCL_CB* p_mcb = BTA_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
tBTA_HL_SDP* p_sdp = NULL;
uint16_t event;
- bool release_sdp_buf = false;
event = p_data->hdr.event;
if (event == BTA_HL_SDP_QUERY_OK_EVT) {
+ // this is freed in btif_hl_proc_sdp_query_cfm
p_sdp = (tBTA_HL_SDP*)osi_malloc(sizeof(tBTA_HL_SDP));
memcpy(p_sdp, &p_mcb->sdp, sizeof(tBTA_HL_SDP));
- release_sdp_buf = true;
} else {
status = BTA_HL_STATUS_SDP_FAIL;
}
p_mcb->bd_addr, p_sdp, status);
p_acb->p_cback(BTA_HL_SDP_QUERY_CFM_EVT, (tBTA_HL*)&evt_data);
- if (release_sdp_buf) osi_free_and_reset((void**)&p_sdp);
-
if (p_data->cch_sdp.release_mcl_cb) {
memset(p_mcb, 0, sizeof(tBTA_HL_MCL_CB));
} else {