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

Commit 7eefd328 authored by Stanley Tng's avatar Stanley Tng
Browse files

Fix assert when freeing L2CAP flow control credit packets

The data buffers for the L2CEVT_L2CA_SEND_FLOW_CONTROL_CREDIT and
L2CEVT_L2CAP_RECV_FLOW_CONTROL_CREDIT packets do not need to be
freed.

Test: Run new SL4A Test for Connection-oriented channel
Bug: 69859537
Change-Id: Ice412a1c7f0a9b413376438a9fa34cf3f91482af
parent 96e9e34c
Loading
Loading
Loading
Loading
+0 −15
Original line number Diff line number Diff line
@@ -279,11 +279,6 @@ static void l2c_csm_closed(tL2C_CCB* p_ccb, uint16_t event, void* p_data) {
    case L2CEVT_L2CA_DISCONNECT_REQ: /* Upper wants to disconnect */
      l2cu_release_ccb(p_ccb);
      break;

    case L2CEVT_L2CA_SEND_FLOW_CONTROL_CREDIT:
    case L2CEVT_L2CAP_RECV_FLOW_CONTROL_CREDIT:
      osi_free(p_data);
      break;
  }
}

@@ -604,11 +599,6 @@ static void l2c_csm_w4_l2cap_connect_rsp(tL2C_CCB* p_ccb, uint16_t event,
        l2cu_send_peer_connect_req(p_ccb); /* Start Connection     */
      }
      break;

    case L2CEVT_L2CA_SEND_FLOW_CONTROL_CREDIT:
    case L2CEVT_L2CAP_RECV_FLOW_CONTROL_CREDIT:
      osi_free(p_data);
      break;
  }
}

@@ -1182,11 +1172,6 @@ static void l2c_csm_w4_l2cap_disconnect_rsp(tL2C_CCB* p_ccb, uint16_t event,
    case L2CEVT_L2CA_DATA_WRITE: /* Upper layer data to send */
      osi_free(p_data);
      break;

    case L2CEVT_L2CA_SEND_FLOW_CONTROL_CREDIT:
    case L2CEVT_L2CAP_RECV_FLOW_CONTROL_CREDIT:
      osi_free(p_data);
      break;
  }
}