Bluetooth: fix null ptr deref on hci_sync_conn_complete_evt
authorSoenke Huster <soenke.huster@eknoes.de>
Fri, 14 Jan 2022 16:44:02 +0000 (17:44 +0100)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Fri, 14 Jan 2022 20:20:49 +0000 (12:20 -0800)
commit3afee2118132e93e5f6fa636dfde86201a860ab3
treeb3cd93800092b97a485f96f39576dbb2f13b913a
parentc07ba878ca199a6089cdb323bf526adbeeb4201f
Bluetooth: fix null ptr deref on hci_sync_conn_complete_evt

This event is just specified for SCO and eSCO link types.
On the reception of a HCI_Synchronous_Connection_Complete for a BDADDR
of an existing LE connection, LE link type and a status that triggers the
second case of the packet processing a NULL pointer dereference happens,
as conn->link is NULL.

Signed-off-by: Soenke Huster <soenke.huster@eknoes.de>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
net/bluetooth/hci_event.c