[dpdk-dev] [PATCH 2/2] net/mlx5: fix Tx queue creation error flow
Michael Baum
michaelba at nvidia.com
Tue Dec 15 09:48:32 CET 2020
In Tx queue creation, there are two validations for the Tx
configuration.
When one of them fails, the MR btree memory was not freed what caused a
memory leak.
Free it.
Fixes: f6d9ab4e769f ("net/mlx5: check Tx queue size overflow")
Cc: stable at dpdk.org
Signed-off-by: Michael Baum <michaelba at nvidia.com>
Acked-by: Matan Azrad <matan at nvidia.com>
---
drivers/net/mlx5/mlx5_txq.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c
index d96abef..b81bb4a 100644
--- a/drivers/net/mlx5/mlx5_txq.c
+++ b/drivers/net/mlx5/mlx5_txq.c
@@ -1146,6 +1146,7 @@ struct mlx5_txq_ctrl *
LIST_INSERT_HEAD(&priv->txqsctrl, tmpl, next);
return tmpl;
error:
+ mlx5_mr_btree_free(&tmpl->txq.mr_ctrl.cache_bh);
mlx5_free(tmpl);
return NULL;
}
--
1.8.3.1
More information about the dev
mailing list