Skip to content

Commit

Permalink
Bluetooth: Fix leaking blacklist when unregistering a hci device
Browse files Browse the repository at this point in the history
The blacklist should be freed before the hci device gets unregistered.

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
  • Loading branch information
Johan Hedberg authored and Gustavo F. Padovan committed Jan 19, 2011
1 parent 4571928 commit e2e0cac
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions net/bluetooth/hci_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1011,6 +1011,10 @@ int hci_unregister_dev(struct hci_dev *hdev)

destroy_workqueue(hdev->workqueue);

hci_dev_lock_bh(hdev);
hci_blacklist_clear(hdev);
hci_dev_unlock_bh(hdev);

__hci_dev_put(hdev);

return 0;
Expand Down

0 comments on commit e2e0cac

Please sign in to comment.