Bluetooth: fix oops in l2cap_connect_req
authorNathan Holstein <nathan.holstein@gmail.com>
Fri, 15 Oct 2010 15:54:02 +0000 (11:54 -0400)
committerGustavo F. Padovan <padovan@profusion.mobi>
Sun, 17 Oct 2010 23:19:19 +0000 (21:19 -0200)
commitd793fe8caa3911e6a1e826b45d4ee00d250cdec8
tree7b89346a23d81e5ca5c7d57d2f51c5fc32f34f8a
parentcd07202cc8262e1669edff0d97715f3dd9260917
Bluetooth: fix oops in l2cap_connect_req

In error cases when the ACL is insecure or we fail to allocate a new
struct sock, we jump to the "response" label.  If so, "sk" will be
null and the kernel crashes.

Signed-off-by: Nathan Holstein <nathan.holstein@gmail.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
net/bluetooth/l2cap.c