Skip to content

Commit

Permalink
net/mlx5e: TC, Fix error handling memory leak
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Chris Mi authored and Saeed Mahameed committed Aug 10, 2021
1 parent ba317e8 commit 88bbd7b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/ethernet/mellanox/mlx5/core/esw/sample.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 88bbd7b

Please sign in to comment.