[PATCH BlueZ v1 1/2] btdev: Fix crash on page_timeout

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


From: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx>

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 4c9f5d1811d4..139ab69b4029 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;

[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux