dect
/
linux-2.6
Archived
13
0
Fork 0

Bluetooth: Fix crash when monitor timeout expires

The code was crashing due to a invalid access to hci_conn after the
channel disconnect.

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Reviewed-by: João Paulo Rechi Vita <jprvita@profusion.mobi>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
This commit is contained in:
Gustavo F. Padovan 2010-05-01 16:15:41 -03:00 committed by Marcel Holtmann
parent f6e6b16823
commit 0ee0d20855
1 changed files with 3 additions and 0 deletions

View File

@ -1568,6 +1568,9 @@ static struct sk_buff *l2cap_create_iframe_pdu(struct sock *sk, struct msghdr *m
BT_DBG("sk %p len %d", sk, (int)len);
if (!conn)
return ERR_PTR(-ENOTCONN);
if (sdulen)
hlen += 2;