Commit e2e0cacbd4b0c7c69c7591d37c243f2363aeaa71

Authored by Johan Hedberg
Committed by Gustavo F. Padovan
1 parent 4571928fc7

Bluetooth: Fix leaking blacklist when unregistering a hci device

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>

Showing 1 changed file with 4 additions and 0 deletions Side-by-side Diff

net/bluetooth/hci_core.c
... ... @@ -1011,6 +1011,10 @@
1011 1011  
1012 1012 destroy_workqueue(hdev->workqueue);
1013 1013  
  1014 + hci_dev_lock_bh(hdev);
  1015 + hci_blacklist_clear(hdev);
  1016 + hci_dev_unlock_bh(hdev);
  1017 +
1014 1018 __hci_dev_put(hdev);
1015 1019  
1016 1020 return 0;