Skip to content

Commit 88bbd7b

Browse files
Chris MiSaeed Mahameed
authored andcommitted
net/mlx5e: TC, Fix error handling memory leak
Free the offload sample action on error. Fixes: f94d638 ("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>
1 parent ba317e8 commit 88bbd7b

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

  • drivers/net/ethernet/mellanox/mlx5/core/esw

‎drivers/net/ethernet/mellanox/mlx5/core/esw/sample.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -501,6 +501,7 @@ mlx5_esw_sample_offload(struct mlx5_esw_psample *esw_psample,
501501
err_offload_rule:
502502
mlx5_esw_vporttbl_put(esw, &per_vport_tbl_attr);
503503
err_default_tbl:
504+
kfree(sample_flow);
504505
return ERR_PTR(err);
505506
}
506507

0 commit comments

Comments
 (0)