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

Commit 7bd8480e authored by Zach Johnson's avatar Zach Johnson Committed by Automerger Merge Worker
Browse files

🚨 memory leak 🚨 memory leak 🚨 am: 1d12f28e

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1403154

Change-Id: I8be879ba5ec77c9f192a0ef44dfc664551d86347
parents 7a8cc1b3 1d12f28e
Loading
Loading
Loading
Loading
+1 −11
Original line number Diff line number Diff line
@@ -1752,19 +1752,9 @@ static void bta_dm_inq_results_cb(tBTM_INQ_RESULTS* p_inq, uint8_t* p_eir,
 *
 ******************************************************************************/
static void bta_dm_inq_cmpl_cb(void* p_result) {
  tBTA_DM_MSG* p_msg = (tBTA_DM_MSG*)osi_malloc(sizeof(tBTA_DM_MSG));

  APPL_TRACE_DEBUG("%s", __func__);

  if (!bta_dm_search_cb.cancel_pending) {
  bta_dm_inq_cmpl(((tBTM_INQUIRY_CMPL*)p_result)->num_resp);
  } else {
    bta_dm_search_cb.cancel_pending = false;
    bta_dm_search_cancel_notify();
    p_msg->hdr.event = BTA_DM_SEARCH_CMPL_EVT;
    p_msg->hdr.layer_specific = BTA_DM_API_DISCOVER_EVT;
    bta_sys_sendmsg(p_msg);
  }
}

/*******************************************************************************