diff mbox series

[1/3] net/mlx5: fix unfreed memory on ASO age close

Message ID 717f300dac82c4802e2bee54953a5304d7aa36cd.1605689124.git.dekelp@nvidia.com (mailing list archive)
State Accepted, archived
Delegated to: Raslan Darawsheh
Headers show
Series ASO age action fixes | expand


Context Check Description
ci/checkpatch success coding style OK

Commit Message

Dekel Peled Nov. 18, 2020, 8:59 a.m. UTC
Recent patch introduced the use of ASO flow hit action for age action.
The relevant management struct uses dynamically allocated memory.
This memory was not freed on closing.

This patch adds memory freeing as needed.

Fixes: f935ed4b645a ("net/mlx5: support flow hit action for aging")

Signed-off-by: Dekel Peled <dekelp@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
 drivers/net/mlx5/mlx5.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series


diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index ede5fd44ab..627e511b12 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -419,7 +419,7 @@  mlx5_flow_aso_age_mng_close(struct mlx5_dev_ctx_shared *sh)
-	memset(&sh->aso_age_mng, 0, sizeof(sh->aso_age_mng));
+	mlx5_free(sh->aso_age_mng);