mwifiex: pcie: Fix memory leak in mwifiex_pcie_init_evt_ring
authorNavid Emamdoost <navid.emamdoost@gmail.com>
Fri, 4 Oct 2019 20:16:48 +0000 (15:16 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 31 Dec 2019 15:43:49 +0000 (16:43 +0100)
commit01b987532b79828ca67efb63eeec2bf07f3099df
treec0179079a60a13bfa55a6e2d4c3af8f95b5639e4
parentd754a529a8be55f009c6679d772c472c1632cd5b
mwifiex: pcie: Fix memory leak in mwifiex_pcie_init_evt_ring

[ Upstream commit d10dcb615c8e29d403a24d35f8310a7a53e3050c ]

In mwifiex_pcie_init_evt_ring, a new skb is allocated which should be
released if mwifiex_map_pci_memory() fails. The release for skb and
card->evtbd_ring_vbase is added.

Fixes: 0732484b47b5 ("mwifiex: separate ring initialization and ring creation routines")
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Acked-by: Ganapathi Bhat <gbhat@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/marvell/mwifiex/pcie.c