mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-06-05 21:04:49 +00:00
nimble/gap: Check if conn is present if with asserts disabled
BLE_HS_DBG_ASSERT is not enabled by default, and that code is already handling error path.
This commit is contained in:
@@ -3412,6 +3412,9 @@ ble_gap_rx_conn_complete(struct ble_gap_conn_complete *evt, uint8_t instance)
|
||||
/* We verified that there is a free connection when the procedure began. */
|
||||
conn = ble_hs_conn_alloc(evt->connection_handle);
|
||||
BLE_HS_DBG_ASSERT(conn != NULL);
|
||||
if (conn == NULL) {
|
||||
return BLE_HS_ENOMEM;
|
||||
}
|
||||
|
||||
conn->bhc_itvl = evt->conn_itvl;
|
||||
conn->bhc_latency = evt->conn_latency;
|
||||
|
||||
Reference in New Issue
Block a user