projects
/
linux-flexiantxendom0.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Bluetooth: hci_ldisc: fix NULL-pointer dereference on tty_close
[linux-flexiantxendom0.git]
/
drivers
/
bluetooth
/
hci_ldisc.c
diff --git
a/drivers/bluetooth/hci_ldisc.c
b/drivers/bluetooth/hci_ldisc.c
index
36dafef
..
8f3d6db
100644
(file)
--- a/
drivers/bluetooth/hci_ldisc.c
+++ b/
drivers/bluetooth/hci_ldisc.c
@@
-309,11
+309,11
@@
static void hci_uart_tty_close(struct tty_struct *tty)
hci_uart_close(hdev);
if (test_and_clear_bit(HCI_UART_PROTO_SET, &hu->flags)) {
- hu->proto->close(hu);
if (hdev) {
hci_unregister_dev(hdev);
hci_free_dev(hdev);
}
+ hu->proto->close(hu);
}
kfree(hu);
}