From: Marcel Holtmann Date: Fri, 5 Dec 2014 10:45:22 +0000 (+0100) Subject: Bluetooth: Fix memory leaks from discovery filter UUID list X-Git-Tag: omap-for-v3.19/fixes-rc1~125^2~28^2~5^2~27 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=22078800c337cf374d58b63a5b1f670d470e6dbf;p=pandora-kernel.git Bluetooth: Fix memory leaks from discovery filter UUID list In case of failure or when unplugging a controller, the allocated memory for the UUID list of the discovery filter is not freed. Use the newly introduced helper for reset the discovery filter and with that also freeing existing memory. Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg --- diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index 3c81b5cdda83..8b3f839ba826 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c @@ -4255,6 +4255,7 @@ void hci_unregister_dev(struct hci_dev *hdev) hci_remote_oob_data_clear(hdev); hci_bdaddr_list_clear(&hdev->le_white_list); hci_conn_params_clear_all(hdev); + hci_discovery_filter_clear(hdev); hci_dev_unlock(hdev); hci_dev_put(hdev); Reading git-diff-tree failed