net/mlx5: fix resource leak in case of error
authorRaslan Darawsheh <rasland@mellanox.com>
Tue, 8 May 2018 09:11:27 +0000 (12:11 +0300)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 14 May 2018 21:31:50 +0000 (22:31 +0100)
commit690de2850b26466ad5325fde3e1aff040e3868f8
tree7ce5652c9aba2db11f301b15331fbef53d38f563
parente9f4166014cb7abf8c74b913ff046487d0e7bea2
net/mlx5: fix resource leak in case of error

If something went wrong in mlx5_pci_prob the allocated eth dev
will cause a memory leak.

This commit release the eth dev that was previously allocated.

Fixes: 771fa900b73a ("mlx5: introduce new driver for Mellanox ConnectX-4 adapters")
Cc: stable@dpdk.org
Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
drivers/net/mlx5/mlx5.c