mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-24 19:40:21 +09:00
cassini: Fix a memory leak in the error handling path of cas_init_one()
[ Upstream commit412cd77a2c] cas_saturn_firmware_init() allocates some memory using vmalloc(). This memory is freed in the .remove() function but not it the error handling path of the probe. Add the missing vfree() to avoid a memory leak, should an error occur. Fixes:fcaa40669c("cassini: use request_firmware") Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Reviewed-by: Pavan Chebbi <pavan.chebbi@broadcom.com> Reviewed-by: Simon Horman <simon.horman@corigine.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
9cae243b9a
commit
172146c26f
@@ -5095,6 +5095,8 @@ err_out_iounmap:
|
||||
cas_shutdown(cp);
|
||||
mutex_unlock(&cp->pm_mutex);
|
||||
|
||||
vfree(cp->fw_data);
|
||||
|
||||
pci_iounmap(pdev, cp->regs);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user