projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dc45d37
)
Bluetooth: btusb: Fix memleak in btusb_mtk_submit_wmt_recv_urb
author
Dinghao Liu
<dinghao.liu@zju.edu.cn>
Sun, 23 Aug 2020 07:44:21 +0000
(15:44 +0800)
committer
Marcel Holtmann
<marcel@holtmann.org>
Mon, 31 Aug 2020 16:03:08 +0000
(18:03 +0200)
When kmalloc() on buf fails, urb should be freed just like
when kmalloc() on dr fails.
Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
drivers/bluetooth/btusb.c
patch
|
blob
|
history
diff --git
a/drivers/bluetooth/btusb.c
b/drivers/bluetooth/btusb.c
index 414575eccbad7873b58f295fd769f9f8605c6f7c..fe80588c7bd3a8284d7744cc43bf8e0f58f8bf96 100644
(file)
--- a/
drivers/bluetooth/btusb.c
+++ b/
drivers/bluetooth/btusb.c
@@
-2896,6
+2896,7
@@
static int btusb_mtk_submit_wmt_recv_urb(struct hci_dev *hdev)
buf = kmalloc(size, GFP_KERNEL);
if (!buf) {
kfree(dr);
+ usb_free_urb(urb);
return -ENOMEM;
}