Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933613AbbHKCNw (ORCPT ); Mon, 10 Aug 2015 22:13:52 -0400 Received: from mga02.intel.com ([134.134.136.20]:3419 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933433AbbHKCNv convert rfc822-to-8bit (ORCPT ); Mon, 10 Aug 2015 22:13:51 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,649,1432623600"; d="scan'208";a="766065515" From: "Brown, Aaron F" To: Jia-Ju Bai , "Kirsher, Jeffrey T" , "Brandeburg, Jesse" CC: "intel-wired-lan@lists.osuosl.org" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH] igb: Fix a memory leak in igb_probe Thread-Topic: [PATCH] igb: Fix a memory leak in igb_probe Thread-Index: AQHQz4f+nlayIo7e0k+o1ElV6pYvs54GF4Kw Date: Tue, 11 Aug 2015 02:13:48 +0000 Message-ID: <309B89C4C689E141A5FF6A0C5FB2118B81AE35CA@ORSMSX101.amr.corp.intel.com> References: <1438783516-13283-1-git-send-email-baijiaju1990@163.com> In-Reply-To: <1438783516-13283-1-git-send-email-baijiaju1990@163.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.22.254.140] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1034 Lines: 24 > From: netdev-owner@vger.kernel.org [mailto:netdev-owner@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@lists.osuosl.org; netdev@vger.kernel.org; linux- > kernel@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 > --- > drivers/net/ethernet/intel/igb/igb_main.c | 1 + > 1 file changed, 1 insertion(+) Tested-by: Aaron Brown -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/