nimble/host: Check if HCI command buffer was allocated

BLE_HS_DBG_ASSERT is not enabled by default, and that code is
already handling error path.
This commit is contained in:
Szymon Janc
2025-06-30 16:50:29 +02:00
committed by Rahul Tank
parent 6a703300d4
commit 125e034cc3
+3
View File
@@ -70,6 +70,9 @@ ble_hs_hci_cmd_send(uint16_t opcode, uint8_t len, const void *cmddata)
return BLE_HS_ENOMEM_EVT;
}
BLE_HS_DBG_ASSERT(cmd != NULL);
if (cmd == NULL) {
return BLE_HS_ENOMEM;
}
buf = (uint8_t *)cmd;
#if !(SOC_ESP_NIMBLE_CONTROLLER) && CONFIG_BT_CONTROLLER_ENABLED