diff options
author | wangfei <wangfei25@xiaomi.com> | 2021-08-05 23:21:11 +0800 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2023-03-22 21:05:14 -0700 |
commit | e19b6f66fe92b3e958141c14d00b2bab120aafa9 (patch) | |
tree | ccc2a734d21cc9815e4261b6da3e585cf60646d1 | |
parent | 51016bfcae593c68809a16f2a8a27ec80da20fc2 (diff) |
Fix L2CAP hold queue null pointer issue
We should not enqueue one buffer into the queue
with null pointer.
Test: mm
CRs-Fixed: 3410704
Change-Id: I2adad5fbec33d9dfe250a3b1ad7331459bb5bc32
Signed-off-by: wangfei <wangfei25@xiaomi.com>
(cherry picked from commit 72a647c829e432e559010163edc0ab737786737d)
-rw-r--r-- | stack/l2cap/l2c_csm.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/stack/l2cap/l2c_csm.cc b/stack/l2cap/l2c_csm.cc index 2dce61377..107bb0fe9 100644 --- a/stack/l2cap/l2c_csm.cc +++ b/stack/l2cap/l2c_csm.cc @@ -2398,8 +2398,9 @@ void l2c_enqueue_peer_data(tL2C_CCB* p_ccb, BT_HDR* p_buf) { "p_ccb->local_cid = %u p_ccb->remote_cid = %u", __func__, p_ccb, p_ccb->in_use, p_ccb->chnl_state, p_ccb->local_cid, p_ccb->remote_cid); + } else { + fixed_queue_enqueue(p_ccb->xmit_hold_q, p_buf); } - fixed_queue_enqueue(p_ccb->xmit_hold_q, p_buf); l2cu_check_channel_congestion(p_ccb); |