OSDN Git Service

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)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 9 Oct 2019 08:24:52 +0000 (11:24 +0300)
commitdb8fd2cde93227e566a412cf53173ffa227998bc
tree5ca5ecc7bfd2693bf9944992367c2358591e9c76
parent39e50f5ce26c0aa413cf2a680a401a35ec6508bf
mwifiex: pcie: Fix memory leak in mwifiex_pcie_alloc_cmdrsp_buf

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>
drivers/net/wireless/marvell/mwifiex/pcie.c