]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mwifiex: pcie: Fix memory leak in mwifiex_pcie_alloc_cmdrsp_buf
authorNavid Emamdoost <navid.emamdoost@gmail.com>
Fri, 4 Oct 2019 20:08:52 +0000 (15:08 -0500)
committerBen Hutchings <ben@decadent.org.uk>
Tue, 10 Dec 2019 18:01:31 +0000 (18:01 +0000)
commitf0eed3b1a34f1e7d8b2c06ad5ddf0ea60aea71ca
treef44310fd8a1e9b897d2ba2a2e152e2f9a9be0279
parentf26d980434a06f44b693a26a87aa5300fa4016fd
mwifiex: pcie: Fix memory leak in mwifiex_pcie_alloc_cmdrsp_buf

commit db8fd2cde93227e566a412cf53173ffa227998bc upstream.

In mwifiex_pcie_alloc_cmdrsp_buf, a new skb is allocated which should be
released if mwifiex_map_pci_memory() fails. The release is added.

Fixes: fc3314609047 ("mwifiex: use pci_alloc/free_consistent APIs for PCIe")
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Acked-by: Ganapathi Bhat <gbhat@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
[bwh: Backported to 3.16: adjust filename]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/net/wireless/mwifiex/pcie.c