From d166d53238f67ff80b0597cbccd3f1f04e0b7aca Mon Sep 17 00:00:00 2001 From: Mark Wang Date: Thu, 5 Jun 2025 14:46:19 +0800 Subject: [PATCH] bluetooth: keys: addr is null and assert in bt_keys_find_addr When there are br connections connected, find_key_in_use call bt_conn_get_dst to get br connection's dst and bt_conn_get_dst return NULL, then bt_keys_find_addr aseert because addr is NULL. Signed-off-by: Mark Wang --- subsys/bluetooth/host/keys.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subsys/bluetooth/host/keys.c b/subsys/bluetooth/host/keys.c index 6341fc1e58e..1205494e856 100644 --- a/subsys/bluetooth/host/keys.c +++ b/subsys/bluetooth/host/keys.c @@ -79,7 +79,7 @@ static bool key_is_in_use(uint8_t id) { struct key_data kdata = { false, id }; - bt_conn_foreach(BT_CONN_TYPE_ALL, find_key_in_use, &kdata); + bt_conn_foreach(BT_CONN_TYPE_LE, find_key_in_use, &kdata); return kdata.in_use; }