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

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
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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);
}