From 08d1f529f4100ee65481b3c14f5750232900e3a6 Mon Sep 17 00:00:00 2001 From: Zhang Hai Peng Date: Tue, 3 Jun 2025 12:13:22 +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 c3118fdd5c..0323877bfb 100644 --- a/components/bt/host/bluedroid/stack/l2cap/l2c_link.c +++ b/components/bt/host/bluedroid/stack/l2cap/l2c_link.c @@ -1078,7 +1078,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; } }