net/mlx5: fix leak on Rx queue creation failure
authorMichael Baum <michaelba@nvidia.com>
Wed, 11 Nov 2020 07:36:45 +0000 (07:36 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Sat, 14 Nov 2020 00:36:19 +0000 (01:36 +0100)
commit41217cec2faa5ab5cf0a0a714135ed49b80911b5
tree1e7e48db29354d5ff015844f9775db55fa3c9acc
parent8b3799531b9bc46fb518c4ec84f4960ecc78a0d0
net/mlx5: fix leak on Rx queue creation failure

In Rx queue creation, there is a validation for the Rx configuration.

When scatter offload validation for buffer split is failed, the Rx queue
object memory was not freed what caused a memory leak.

Free it.

Fixes: a0a45e8af723 ("net/mlx5: configure Rx queue for buffer split")

Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
drivers/net/mlx5/mlx5_rxq.c