mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-02 20:24:32 +02:00
Add assert when malloc fail, that may cause hci timeout
This commit is contained in:
@@ -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);
|
//pkt = (BT_HDR *)hci_hal_env.allocator->alloc(pkt_size);
|
||||||
if (!pkt) {
|
if (!pkt) {
|
||||||
HCI_TRACE_ERROR("%s couldn't aquire memory for inbound data buffer.\n", __func__);
|
HCI_TRACE_ERROR("%s couldn't aquire memory for inbound data buffer.\n", __func__);
|
||||||
|
assert(pkt!=NULL);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
pkt->offset = 0;
|
pkt->offset = 0;
|
||||||
|
Reference in New Issue
Block a user