feat(bt/bluedroid): Add print and assert when failed to alloc memory

This commit is contained in:
chenjianhua
2024-06-20 12:22:37 +08:00
parent df432b8508
commit f8ad2871e6
8 changed files with 63 additions and 59 deletions

View File

@@ -592,7 +592,7 @@ static int host_recv_pkt_cb(uint8_t *data, uint16_t len)
}
#endif
pkt_size = BT_PKT_LINKED_HDR_SIZE + BT_HDR_SIZE + len;
linked_pkt = (pkt_linked_item_t *) osi_calloc(pkt_size);
linked_pkt = (pkt_linked_item_t *) osi_calloc_base(pkt_size);
if (!linked_pkt) {
#if (BLE_ADV_REPORT_FLOW_CONTROL == TRUE)
hci_adv_credits_consumed(1);