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)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 9 Oct 2019 08:25:22 +0000 (11:25 +0300)
commitd10dcb615c8e29d403a24d35f8310a7a53e3050c
tree0eb8640db80eb361b2270637b07bf0f25deebb5c
parentdb8fd2cde93227e566a412cf53173ffa227998bc
mwifiex: pcie: Fix memory leak in mwifiex_pcie_init_evt_ring

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