commit | a225b8c70af9368cfcb52a3608bc862bc88a7801 | [log] [tgz] |
---|---|---|
author | Dean Jenkins <Dean_Jenkins@mentor.com> | Thu Apr 20 18:06:40 2017 +0100 |
committer | Marcel Holtmann <marcel@holtmann.org> | Sat Apr 22 10:28:40 2017 +0200 |
tree | 81a84e350a07ff915609bca3d88001f34c73f873 | |
parent | cb926520e18e6aecc63614b8aa2e40d431aa29cd [diff] |
Bluetooth: hci_ldisc: Ensure hu->hdev set to NULL before freeing hdev When hci_register_dev() fails, hu->hdev should be set to NULL before freeing hdev. This avoids potential use of hu->hdev after it has been freed. This commit sets hu->hdev to NULL before calling hci_free_dev() in error handling scenarios in hci_uart_init_work() and hci_uart_register_dev(). Signed-off-by: Dean Jenkins <Dean_Jenkins@mentor.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>