]> git.baikalelectronics.ru Git - kernel.git/commit
Bluetooth: btusb: Fix memory leak in btusb_mtk_wmt_recv
authorJupeng Zhong <zhongjupeng@yulong.com>
Tue, 2 Feb 2021 01:39:13 +0000 (09:39 +0800)
committerMarcel Holtmann <marcel@holtmann.org>
Tue, 2 Feb 2021 16:25:46 +0000 (17:25 +0100)
commit89740f7aafccfdd0c9f4561ddd83f07690a40c30
tree1a1519d84f484482fd50d6158a56669683db5315
parent80fd92844ea3428cb33013087c887e8c66c4d81b
Bluetooth: btusb: Fix memory leak in btusb_mtk_wmt_recv

In btusb_mtk_wmt_recv if skb_clone fails, the alocated skb should be
released.

Omit the labels “err_out” and “err_free_skb” in this function
implementation so that the desired exception handling code
would be directly specified in the affected if branches.

Fixes: e5391bd07a11 ("btusb: Add protocol support for MediaTek MT7668U USB devices")
Signed-off-by: Jupeng Zhong <zhongjupeng@yulong.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
drivers/bluetooth/btusb.c