[Intel-wired-lan] [PATCH] igb: Fix a memory leak in igb_probe

Brown, Aaron F aaron.f.brown at intel.com
Tue Aug 11 02:13:48 UTC 2015


> From: netdev-owner at vger.kernel.org [mailto:netdev-owner at vger.kernel.org]
> On Behalf Of Jia-Ju Bai
> Sent: Wednesday, August 05, 2015 7:05 AM
> To: Kirsher, Jeffrey T; Brandeburg, Jesse
> Cc: intel-wired-lan at lists.osuosl.org; netdev at vger.kernel.org; linux-
> kernel at vger.kernel.org; Jia-Ju Bai
> Subject: [PATCH] igb: Fix a memory leak in igb_probe
> 
> In error handling code of igb_probe, the memory adapter->shadow_vfta
> allocated by kcalloc in igb_sw_init is not freed. So when register_netdev
> or igb_init_i2c is failed, a memory leak will occur.
> This patch adds kfree to fix it.
> 
> Signed-off-by: Jia-Ju Bai <baijiaju1990 at 163.com>
> ---
>  drivers/net/ethernet/intel/igb/igb_main.c |    1 +
>  1 file changed, 1 insertion(+)

Tested-by: Aaron Brown <aaron.f.brown at intel.com>


More information about the Intel-wired-lan mailing list