net/mlx5: fix memory free on queue create error
authorDekel Peled <dekelp@mellanox.com>
Mon, 20 May 2019 08:07:26 +0000 (11:07 +0300)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 27 May 2019 08:21:04 +0000 (10:21 +0200)
commit9e444764487748d28adb9b57e75452ea8c3c9945
tree5a1530f8ebfa2928bcc432e4d8dd26559744f339
parent73f008334ff427ec6ff680600bcf3ebb57459752
net/mlx5: fix memory free on queue create error

In function mlx5_rxq_ibv_new(), pointer *tmpl allocation is attempted
at the start, but not validated or freed in case of error.
In function mlx5_txq_ibv_new(), pointer *txq_ibv allocation is
attempted at the start, but not freed in case of error.

This patch adds pointers initialization, validation and freeing.

Fixes: 09cb5b581762 ("net/mlx5: separate DPDK from verbs Rx queue objects")
Fixes: faf2667fe8d5 ("net/mlx5: separate DPDK from verbs Tx queue objects")
Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
drivers/net/mlx5/mlx5_rxq.c
drivers/net/mlx5/mlx5_txq.c