From 95d2c8f48d50be7d7a0ccdac4026ba0ab022f92e Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Fri, 1 Jul 2016 11:30:53 +0200 Subject: [PATCH] l2cap: avoid potential null dereference in l2cap_rtx_timeout --- src/l2cap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/l2cap.c b/src/l2cap.c index 465315316..3d677c119 100644 --- a/src/l2cap.c +++ b/src/l2cap.c @@ -304,7 +304,7 @@ static l2cap_channel_t * l2cap_channel_for_rtx_timer(btstack_timer_source_t * ts static void l2cap_rtx_timeout(btstack_timer_source_t * ts){ l2cap_channel_t * channel = l2cap_channel_for_rtx_timer(ts); - if (!ts) return; + if (!channel) return; log_info("l2cap_rtx_timeout for local cid 0x%02x", channel->local_cid);