Merge branch 'bugfix/l2cap_disc_tmo' into 'release/v2.1'
component/bt: fix a bug for L2CAP state machine to access lcb after it is released See merge request !1015
This commit is contained in:
commit
6a9e9759ea
1 changed files with 8 additions and 1 deletions
|
@ -926,6 +926,11 @@ void l2cu_send_peer_disc_rsp (tL2C_LCB *p_lcb, UINT8 remote_id, UINT16 local_cid
|
||||||
BT_HDR *p_buf;
|
BT_HDR *p_buf;
|
||||||
UINT8 *p;
|
UINT8 *p;
|
||||||
|
|
||||||
|
if (!p_lcb) {
|
||||||
|
L2CAP_TRACE_WARNING("lcb already released\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if ((p_buf = l2cu_build_header(p_lcb, L2CAP_DISC_RSP_LEN, L2CAP_CMD_DISC_RSP, remote_id)) == NULL) {
|
if ((p_buf = l2cu_build_header(p_lcb, L2CAP_DISC_RSP_LEN, L2CAP_CMD_DISC_RSP, remote_id)) == NULL) {
|
||||||
L2CAP_TRACE_WARNING ("L2CAP - no buffer for disc_rsp");
|
L2CAP_TRACE_WARNING ("L2CAP - no buffer for disc_rsp");
|
||||||
return;
|
return;
|
||||||
|
@ -1606,7 +1611,9 @@ void l2cu_release_ccb (tL2C_CCB *p_ccb)
|
||||||
p_ccb->should_free_rcb = false;
|
p_ccb->should_free_rcb = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (p_lcb) {
|
||||||
btm_sec_clr_temp_auth_service (p_lcb->remote_bd_addr);
|
btm_sec_clr_temp_auth_service (p_lcb->remote_bd_addr);
|
||||||
|
}
|
||||||
|
|
||||||
/* Stop the timer */
|
/* Stop the timer */
|
||||||
btu_stop_timer (&p_ccb->timer_entry);
|
btu_stop_timer (&p_ccb->timer_entry);
|
||||||
|
|
Loading…
Reference in a new issue