From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Iremonger, Bernard" Subject: Re: [PATCH 1/1] bonding: fix error handling in rte_eth_bond_create() 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> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Cc: "dev@dpdk.org" To: Thomas Monjalon 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) In-Reply-To: <1572867.aSjIJySGWI@xps13> Content-Language: en-US List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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.