[Intel-wired-lan] [PATCH v2] ice: Fix memory leak in ice_get_orom_civd_data()
G, GurucharanX
gurucharanx.g at intel.com
Thu Apr 14 06:46:50 UTC 2022
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces at osuosl.org> On Behalf Of
> Jianglei Nie
> Sent: Saturday, April 2, 2022 7:47 AM
> To: Brandeburg, Jesse <jesse.brandeburg at intel.com>; Nguyen, Anthony L
> <anthony.l.nguyen at intel.com>; davem at davemloft.net; kuba at kernel.org
> Cc: netdev at vger.kernel.org; intel-wired-lan at lists.osuosl.org; linux-
> kernel at vger.kernel.org; Jianglei Nie <niejianglei2021 at 163.com>
> Subject: [Intel-wired-lan] [PATCH v2] ice: Fix memory leak in
> ice_get_orom_civd_data()
>
> A memory chunk was allocated for orom_data in ice_get_orom_civd_data()
> by vzmalloc(). But when ice_read_flash_module() fails, the allocated
> memory is not freed, which will lead to a memory leak.
>
> We can fix it by freeing the orom_data when ce_read_flash_module() fails.
>
> Signed-off-by: Jianglei Nie <niejianglei2021 at 163.com>
> ---
> drivers/net/ethernet/intel/ice/ice_nvm.c | 1 +
> 1 file changed, 1 insertion(+)
>
Tested-by: Gurucharan <gurucharanx.g at intel.com> (A Contingent worker at Intel)
More information about the Intel-wired-lan
mailing list