Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 04a3a5dc authored by Chris Manton's avatar Chris Manton
Browse files

Remove tL2C_CB::tL2C_LCB::p_hcit_rcv_acl

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
parent ca90aba4
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -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 */
+0 −3
Original line number Diff line number Diff line
@@ -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);