diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2008-10-06 06:22:51 -0400 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2008-10-06 06:22:51 -0400 |
commit | 36010ff6788a058147ae15a1aebf97fd30fa51a9 (patch) | |
tree | ebca6f1912cd4424147414120722ada8e737cb52 /drivers/bluetooth/bpa10x.c | |
parent | 94aca1dac6f6d21f4b07e4864baf7768cabcc6e7 (diff) |
[Bluetooth] Fix double frees on error paths of btusb and bpa10x drivers
The transfer buffer of an URB will be automatically freed when using
the URB_FREE_BUFFER transfer_flag. So the extra calls to kfree() will
cause a double free.
Reported-by: Justin Mattock <justinmattock@gmail.com>
Signed-off-by: Rabin Vincent <rabin@rab.in>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'drivers/bluetooth/bpa10x.c')
-rw-r--r-- | drivers/bluetooth/bpa10x.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/bluetooth/bpa10x.c b/drivers/bluetooth/bpa10x.c index 1e55a658e6ce..32f3a8ed8d3d 100644 --- a/drivers/bluetooth/bpa10x.c +++ b/drivers/bluetooth/bpa10x.c | |||
@@ -256,7 +256,6 @@ static inline int bpa10x_submit_intr_urb(struct hci_dev *hdev) | |||
256 | BT_ERR("%s urb %p submission failed (%d)", | 256 | BT_ERR("%s urb %p submission failed (%d)", |
257 | hdev->name, urb, -err); | 257 | hdev->name, urb, -err); |
258 | usb_unanchor_urb(urb); | 258 | usb_unanchor_urb(urb); |
259 | kfree(buf); | ||
260 | } | 259 | } |
261 | 260 | ||
262 | usb_free_urb(urb); | 261 | usb_free_urb(urb); |
@@ -298,7 +297,6 @@ static inline int bpa10x_submit_bulk_urb(struct hci_dev *hdev) | |||
298 | BT_ERR("%s urb %p submission failed (%d)", | 297 | BT_ERR("%s urb %p submission failed (%d)", |
299 | hdev->name, urb, -err); | 298 | hdev->name, urb, -err); |
300 | usb_unanchor_urb(urb); | 299 | usb_unanchor_urb(urb); |
301 | kfree(buf); | ||
302 | } | 300 | } |
303 | 301 | ||
304 | usb_free_urb(urb); | 302 | usb_free_urb(urb); |