mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-29 08:12:41 -04:00
net/mlx5e: TC, Fix error handling memory leak
Free the offload sample action on error.
Fixes: f94d6389f6 ("net/mlx5e: TC, Add support to offload sample action")
Signed-off-by: Chris Mi <cmi@nvidia.com>
Reviewed-by: Oz Shlomo <ozsh@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
This commit is contained in:
@@ -501,6 +501,7 @@ mlx5_esw_sample_offload(struct mlx5_esw_psample *esw_psample,
|
||||
err_offload_rule:
|
||||
mlx5_esw_vporttbl_put(esw, &per_vport_tbl_attr);
|
||||
err_default_tbl:
|
||||
kfree(sample_flow);
|
||||
return ERR_PTR(err);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user