[PATCH] Bluetooth: btmtkuart: fix a memleak in mtk_hci_wmt_sync

Marcel Holtmann marcel at holtmann.org
Wed Sep 22 07:16:44 PDT 2021


Hi Dinghao,

> bdev->evt_skb will get freed in the normal path and one error path
> of mtk_hci_wmt_sync, while the other error paths do not free it,
> which may cause a memleak. This bug is suggested by a static analysis
> tool, please advise.
> 
> Fixes: e0b67035a90b ("Bluetooth: mediatek: update the common setup between MT7622 and other devices")
> Signed-off-by: Dinghao Liu <dinghao.liu at zju.edu.cn>
> ---
> drivers/bluetooth/btmtkuart.c | 13 ++++++++-----
> 1 file changed, 8 insertions(+), 5 deletions(-)

patch has been applied to bluetooth-next tree.

Regards

Marcel




More information about the linux-arm-kernel mailing list