net/mlx5: fix double free on error handling
authorRaslan Darawsheh <rasland@mellanox.com>
Tue, 8 May 2018 09:11:26 +0000 (12:11 +0300)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 14 May 2018 21:31:49 +0000 (22:31 +0100)
commite9f4166014cb7abf8c74b913ff046487d0e7bea2
tree976d4c74fd647feb104252882d7d506fbde506d5
parent32d4246c90172f353c80a23fb83db9a52cce9d98
net/mlx5: fix double free on error handling

When attr_ctx is NULL it will attempt to free the list of devices twice.
Avoid double freeing the list by directly going to error handling.

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