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

Commit 3e3644b2 authored by Myles Watson's avatar Myles Watson
Browse files

l2cap: Use CHECK for memory allocation errors

Test: LE connection
Change-Id: I43c170b40b125345b91e1c91a7993f0d138ac1c5
parent 58047442
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -814,10 +814,8 @@ void l2c_init(void) {
                                  L2CAP_FIXED_CHNL_SMP_BIT;

  l2cb.rcv_pending_q = list_new(NULL);
  if (l2cb.rcv_pending_q == NULL)
    LOG_ERROR(LOG_TAG,
              "%s unable to allocate memory for link layer control block",
              __func__);
  CHECK(l2cb.rcv_pending_q != NULL);

  l2cb.receive_hold_timer = alarm_new("l2c.receive_hold_timer");
}