[dpdk-dev] [PATCH 1/1] bonding: fix error handling in rte_eth_bond_create()

Iremonger, Bernard bernard.iremonger at intel.com
Wed Aug 5 14:28:06 CEST 2015


Hi Thomas,


<snip>
 
> 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.

> 
> [...]
> > -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;
> >  }
> 
> rte_free should be harmless with NULL parameter.
> It is easier to add "if (eth_dev != NULL)" than maintaining many error labels.

I will revise patch to remove multible error labels.

> 
> 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.




More information about the dev mailing list