Skip to content

Commit

Permalink
net/mlx5: E-Switch, Fix memory leak when creating switchdev mode FDB …
Browse files Browse the repository at this point in the history
…tables

The memory allocated for the slow path table flow group input structure
was not freed upon successful return, fix that.

Fixes: 1967ce6 ("net/mlx5: E-Switch, Refactor fast path FDB table creation in switchdev mode")
Signed-off-by: Raed Salem <raeds@mellanox.com>
Reviewed-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
  • Loading branch information
Raed Salem authored and Saeed Mahameed committed Sep 6, 2018
1 parent a090362 commit c88a026
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
Original file line number Diff line number Diff line change
Expand Up @@ -663,6 +663,7 @@ static int esw_create_offloads_fdb_tables(struct mlx5_eswitch *esw, int nvports)
if (err)
goto miss_rule_err;

kvfree(flow_group_in);
return 0;

miss_rule_err:
Expand Down

0 comments on commit c88a026

Please sign in to comment.