From d9fd25fc942e76c9055423dcec35a71ba111f095 Mon Sep 17 00:00:00 2001 From: Zhang Hai Peng Date: Tue, 3 Jun 2025 12:13:32 +0800 Subject: [PATCH] fix(ble/bluedroid): Fixed null pointer assert in l2c_link_check_send_pkts (cherry picked from commit 815057301208c2e6c07af58633bd94526096610a) Co-authored-by: zhanghaipeng --- components/bt/host/bluedroid/stack/l2cap/l2c_link.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/bt/host/bluedroid/stack/l2cap/l2c_link.c b/components/bt/host/bluedroid/stack/l2cap/l2c_link.c index 64304152c1..9898a49d6a 100644 --- a/components/bt/host/bluedroid/stack/l2cap/l2c_link.c +++ b/components/bt/host/bluedroid/stack/l2cap/l2c_link.c @@ -1084,7 +1084,9 @@ void l2c_link_check_send_pkts (tL2C_LCB *p_lcb, tL2C_CCB *p_ccb, BT_HDR *p_buf) p_lcb_cur = list_node(p_node); if (p_lcb_cur == p_lcb) { p_node = list_next(p_node); - p_lcb = list_node(p_node); + if (p_node) { + p_lcb = list_node(p_node); + } break; } }