bonding: fix device initialisation error handling
authorBernard Iremonger <bernard.iremonger@intel.com>
Wed, 5 Aug 2015 14:04:03 +0000 (15:04 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Mon, 10 Aug 2015 00:05:42 +0000 (02:05 +0200)
commitc45c8bd9b96e0bdf97572de25aaa771f63b37466
tree573803fefb2a1c092a00f73c78d184b7262cf7eb
parent85cc012ddda48ee6930789187bbfb661066e1c02
bonding: fix device initialisation error handling

If the name parameter to rte_eth_bond_create() was NULL,
there was a segmentation fault because eth_dev was also NULL.
Add error handling of mac_addrs memory allocation.
Add call to rte_eth_dev_release_port() in error handling.

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Tested-by: Marvin Liu <yong.liu@intel.com>
Acked-by: Michal Jastrzebski <michalx.k.jastrzebski@intel.com>
drivers/net/bonding/rte_eth_bond_api.c