]> www.infradead.org Git - users/jedix/linux-maple.git/commit
Bluetooth: btusb: fix memory leak
authorMuhammad Usama Anjum <musamaanjum@gmail.com>
Tue, 13 Apr 2021 17:52:08 +0000 (22:52 +0500)
committerMarcel Holtmann <marcel@holtmann.org>
Tue, 13 Apr 2021 18:33:11 +0000 (20:33 +0200)
commit8ee70469f035d7e99644b492f6a8485c22a5f366
tree5e94822bf94b63b6063a772f49e5ffb759540612
parent13e66a52f780fd5523c5b27fda9c00c570f1b11e
Bluetooth: btusb: fix memory leak

If btusb_mtk_submit_wmt_recv_urb returns error, wc should be freed and
then error should be returned to prevent memory leak.

Addresses-Coverity: ("Prevent memory leak")
Fixes: 4cbb375e997d ("Bluetooth: btusb: Fixed too many in-token issue for Mediatek Chip.")
Signed-off-by: Muhammad Usama Anjum <musamaanjum@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
drivers/bluetooth/btusb.c