Commit 88bbd7b2 authored by Chris Mi's avatar Chris Mi Committed by Saeed Mahameed

net/mlx5e: TC, Fix error handling memory leak

Free the offload sample action on error.

Fixes: f94d6389 ("net/mlx5e: TC, Add support to offload sample action")
Signed-off-by: default avatarChris Mi <cmi@nvidia.com>
Reviewed-by: default avatarOz Shlomo <ozsh@nvidia.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
parent ba317e83
...@@ -501,6 +501,7 @@ mlx5_esw_sample_offload(struct mlx5_esw_psample *esw_psample, ...@@ -501,6 +501,7 @@ mlx5_esw_sample_offload(struct mlx5_esw_psample *esw_psample,
err_offload_rule: err_offload_rule:
mlx5_esw_vporttbl_put(esw, &per_vport_tbl_attr); mlx5_esw_vporttbl_put(esw, &per_vport_tbl_attr);
err_default_tbl: err_default_tbl:
kfree(sample_flow);
return ERR_PTR(err); return ERR_PTR(err);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment