From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id EF5D25936 for ; Wed, 5 Aug 2015 14:30:21 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga101.fm.intel.com with ESMTP; 05 Aug 2015 05:30:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,616,1432623600"; d="scan'208";a="778268565" Received: from irsmsx151.ger.corp.intel.com ([163.33.192.59]) by orsmga002.jf.intel.com with ESMTP; 05 Aug 2015 05:30:07 -0700 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.22]) by IRSMSX151.ger.corp.intel.com ([169.254.4.151]) with mapi id 14.03.0224.002; Wed, 5 Aug 2015 13:28:07 +0100 From: "Iremonger, Bernard" To: Thomas Monjalon Thread-Topic: [dpdk-dev] [PATCH 1/1] bonding: fix error handling in rte_eth_bond_create() Thread-Index: AQHQzsnsAG54mK6oCU6GC1aaQCYtT5377OSAgAFpL2A= Date: Wed, 5 Aug 2015 12:28:06 +0000 Message-ID: <8CEF83825BEC744B83065625E567D7C219F36E3D@IRSMSX108.ger.corp.intel.com> References: <1438701978-29248-1-git-send-email-bernard.iremonger@intel.com> <1572867.aSjIJySGWI@xps13> In-Reply-To: <1572867.aSjIJySGWI@xps13> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH 1/1] bonding: fix error handling in rte_eth_bond_create() X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Aug 2015 12:30:22 -0000 Hi Thomas, =20 > What is the root cause of the crash? > I guess it is rte_free(eth_dev->data->mac_addrs) because eth_dev is NULL. Yes, that is the roor cause. >=20 > [...] > > -err: > > - rte_free(pci_dev); > > - rte_free(internals); > > +err4: > > rte_free(eth_dev->data->mac_addrs); > > - > > +err3: > > + rte_free(internals); > > +err2: > > + rte_free(pci_dev); > > +err1: > > return -1; > > } >=20 > rte_free should be harmless with NULL parameter. > It is easier to add "if (eth_dev !=3D NULL)" than maintaining many error = labels. I will revise patch to remove multible error labels. >=20 > By the way, why rte_eth_dev_release_port() is not called? I will add a call to rte_eth_dev_release_port(). Regards, Bernard.