]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
Bluetooth: btusb: fix memory leak on fw
authorColin Ian King <colin.king@canonical.com>
Fri, 29 Nov 2019 17:36:35 +0000 (17:36 +0000)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 13 Mar 2020 05:19:20 +0000 (01:19 -0400)
commit6d6f43bf38ed9abac1b3f57d111a8325c2be8a1a
tree6bc718b99263ce5eb42f5ab13ae2fe2d37359867
parent8320f1f55c23aba5f8fb0e8af8035516d1a31982
Bluetooth: btusb: fix memory leak on fw

BugLink: https://bugs.launchpad.net/bugs/1867051
commit 3168c19d7eb17a0108a3b60ad8e8c1b18ea05c63 upstream.

Currently the error return path when the call to btusb_mtk_hci_wmt_sync
fails does not free fw.  Fix this by returning via the error_release_fw
label that performs the free'ing.

Addresses-Coverity: ("Resource leak")
Fixes: a1c49c434e15 ("Bluetooth: btusb: Add protocol support for MediaTek MT7668U USB devices")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/bluetooth/btusb.c