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

Commit b4b22ed7 authored by Greg Kaiser's avatar Greg Kaiser Committed by android-build-merger
Browse files

Merge "bta_jv_act: Avoid writing through NULL/freed pointer"

am: e1856f49

Change-Id: I30585d79f53f3647aa626f268f31cb16e29aaf0c
parents 41e640e4 e1856f49
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -2165,14 +2165,18 @@ void bta_jv_l2cap_connect_le(uint16_t remote_chan,
  // it could have been deleted/moved from under us, so re-find it */
  t = fcclient_find_by_id(id);
  if (t) {
    if (evt.l2c_cl_init.status == BTA_JV_SUCCESS)
    if (evt.l2c_cl_init.status == BTA_JV_SUCCESS) {
      call_init_f = !t->init_called;
    else
    } else {
      fcclient_free(t);
      t = NULL;
    }
  }
  if (call_init_f) p_cback(BTA_JV_L2CAP_CL_INIT_EVT, &evt, l2cap_socket_id);
  if (t) {
    t->init_called = true;
  }
}

/* stops an LE L2CAP server */
void bta_jv_l2cap_stop_server_le(uint16_t local_chan) {