From f3c35ed835bda18573e07d02f725be5106ad8ae8 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Thu, 15 Feb 2024 09:30:56 -0500 Subject: [PATCH] btdev: Fix crash on page_timeout If remote device cannot be found after page_timeout then the code shall not proceed to call pending_conn_del. --- emulator/btdev.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/emulator/btdev.c b/emulator/btdev.c index 4c9f5d181..139ab69b4 100644 --- a/emulator/btdev.c +++ b/emulator/btdev.c @@ -1248,6 +1248,9 @@ static void conn_complete(struct btdev *btdev, struct bt_hci_evt_conn_complete cc; struct btdev *remote = find_btdev_by_bdaddr(bdaddr); + if (!remote) + return; + if (!status) { struct btdev_conn *conn; -- 2.47.3