aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hci_core.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2011-01-04 12:08:50 +0200
committerGustavo F. Padovan <padovan@profusion.mobi>2011-01-19 14:40:42 -0200
commite2e0cacbd4b0c7c69c7591d37c243f2363aeaa71 (patch)
treecf94370f2989dc0d18c770ef5c32161d91c8b24f /net/bluetooth/hci_core.c
parent4571928fc73589e9c5217cd069d2c0b4ff1818a8 (diff)
downloadkernel_samsung_smdk4412-e2e0cacbd4b0c7c69c7591d37c243f2363aeaa71.zip
kernel_samsung_smdk4412-e2e0cacbd4b0c7c69c7591d37c243f2363aeaa71.tar.gz
kernel_samsung_smdk4412-e2e0cacbd4b0c7c69c7591d37c243f2363aeaa71.tar.bz2
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>
Diffstat (limited to 'net/bluetooth/hci_core.c')
-rw-r--r--net/bluetooth/hci_core.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 8b602d8..9c4541b 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -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;