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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Jan 2020 19:07:06 +0000 (20:07 +0100)
commitf2bde0e9989e243345316e3c96b352ab94037340
tree8545dd10fcc90eb25dcfb83a6af7ee7a751baf4f
parent0aa8632c57930243bea6fa4ebcbff8fac089e664
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>
Cc: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/marvell/mwifiex/pcie.c