projects
/
wrapfs-5.8.y.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
97811d9
)
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
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Thu, 29 Oct 2020 09:08:27 +0000
(10:08 +0100)
[ Upstream commit
d33fe77bdf75806d785dabf90d21d962122e5296
]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/bluetooth/btusb.c
patch
|
blob
|
history
diff --git
a/drivers/bluetooth/btusb.c
b/drivers/bluetooth/btusb.c
index a5fef9aa419fd1758d08074f6487082e0948a141..91a0c84d55c97b2f93acff6ce8df44b16991fe5b 100644
(file)
--- a/
drivers/bluetooth/btusb.c
+++ b/
drivers/bluetooth/btusb.c
@@
-2849,6
+2849,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;
}