OSDN Git Service

Remove tL2C_CB::tL2C_LCB::p_hcit_rcv_acl
authorChris Manton <cmanton@google.com>
Sun, 23 Aug 2020 18:55:19 +0000 (11:55 -0700)
committerChris Manton <cmanton@google.com>
Mon, 24 Aug 2020 15:01:13 +0000 (08:01 -0700)
Never allocated, but always freed buffer

Luckily it's always null

Towards readable code

Bug: 163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I0a5a6ea2178b1478b9a992028f5f181ed5344367

stack/l2cap/l2c_int.h
stack/l2cap/l2c_utils.cc

index fb7bf85..69e42e2 100644 (file)
@@ -380,7 +380,6 @@ typedef struct t_l2c_linkcb {
 
   uint8_t peer_chnl_mask[L2CAP_FIXED_CHNL_ARRAY_SIZE];
 
-  BT_HDR* p_hcit_rcv_acl;   /* Current HCIT ACL buf being rcvd */
   uint16_t idle_timeout_sv; /* Save current Idle timeout */
   uint8_t acl_priority;     /* L2C_PRIORITY_NORMAL or L2C_PRIORITY_HIGH */
   tL2CA_NOCP_CB* p_nocp_cb; /* Num Cmpl pkts callback */
index befe18e..f2f490e 100644 (file)
@@ -143,9 +143,6 @@ void l2cu_release_lcb(tL2C_LCB* p_lcb) {
   alarm_free(p_lcb->info_resp_timer);
   p_lcb->info_resp_timer = NULL;
 
-  /* Release any unfinished L2CAP packet on this link */
-  osi_free_and_reset((void**)&p_lcb->p_hcit_rcv_acl);
-
   if (p_lcb->transport == BT_TRANSPORT_BR_EDR) /* Release all SCO links */
     BTM_RemoveSco(p_lcb->remote_bd_addr);