[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <BYAPR11MB3367D0896E6DD74BE81196FCFCEF9@BYAPR11MB3367.namprd11.prod.outlook.com>
Date: Thu, 14 Apr 2022 06:41:52 +0000
From: "G, GurucharanX" <gurucharanx.g@...el.com>
To: Jianglei Nie <niejianglei2021@....com>,
"Brandeburg, Jesse" <jesse.brandeburg@...el.com>,
"Nguyen, Anthony L" <anthony.l.nguyen@...el.com>,
"davem@...emloft.net" <davem@...emloft.net>,
"kuba@...nel.org" <kuba@...nel.org>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"intel-wired-lan@...ts.osuosl.org" <intel-wired-lan@...ts.osuosl.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [Intel-wired-lan] [PATCH] ice: Fix memory leak in
ice_get_orom_civd_data()
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@...osl.org> On Behalf Of
> Jianglei Nie
> Sent: Friday, April 1, 2022 1:31 PM
> To: Brandeburg, Jesse <jesse.brandeburg@...el.com>; Nguyen, Anthony L
> <anthony.l.nguyen@...el.com>; davem@...emloft.net; kuba@...nel.org
> Cc: netdev@...r.kernel.org; intel-wired-lan@...ts.osuosl.org; linux-
> kernel@...r.kernel.org; Jianglei Nie <niejianglei2021@....com>
> Subject: [Intel-wired-lan] [PATCH] ice: Fix memory leak in
> ice_get_orom_civd_data()
>
> Line 637 allocates a memory chunk for orom_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@....com>
> ---
> drivers/net/ethernet/intel/ice/ice_nvm.c | 1 +
> 1 file changed, 1 insertion(+)
>
Tested-by: Gurucharan <gurucharanx.g@...el.com> (A Contingent worker at Intel)
Powered by blists - more mailing lists