From: Michael Baum Date: Wed, 11 Nov 2020 07:36:46 +0000 (+0000) Subject: net/mlx5: fix leak on ASO age pools resize failure X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=436973b0d1c9e5290c585c3e05d164d3745221f4;p=dpdk.git net/mlx5: fix leak on ASO age pools resize failure In ASO age pools resize, the PMD starts ASO data-path. When starting ASO data-path is failed, the pools memory was not freed what caused a memory leak. Free it. Fixes: f935ed4b645a ("net/mlx5: support flow hit action for aging") Signed-off-by: Michael Baum Acked-by: Matan Azrad --- diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c index 666cad407a..62d9ca9ffb 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c @@ -9347,8 +9347,10 @@ flow_dv_aso_age_pools_resize(struct rte_eth_dev *dev) /* First ASO flow hit allocation - starting ASO data-path. */ int ret = mlx5_aso_queue_start(priv->sh); - if (ret) + if (ret) { + mlx5_free(pools); return ret; + } } mng->n = resize; mng->pools = pools;