Add assert when malloc fail, that may cause hci timeout

This commit is contained in:
gengyuchao 2020-08-06 22:30:24 +08:00 committed by maojianxin
parent e148f41d79
commit 99c0cac942

View File

@ -365,6 +365,7 @@ static int host_recv_pkt_cb(uint8_t *data, uint16_t len)
//pkt = (BT_HDR *)hci_hal_env.allocator->alloc(pkt_size);
if (!pkt) {
HCI_TRACE_ERROR("%s couldn't aquire memory for inbound data buffer.\n", __func__);
assert(pkt!=NULL);
return -1;
}
pkt->offset = 0;