net/mlx5: E-Switch, free flow_group_in after creating the restore table
authorRoi Dayan <roid@mellanox.com>
Thu, 19 Mar 2020 15:48:18 +0000 (17:48 +0200)
committerSaeed Mahameed <saeedm@mellanox.com>
Thu, 26 Mar 2020 06:18:59 +0000 (23:18 -0700)
We allocate a temporary memory but forget to free it.

Fixes: 11b717d61526 ("net/mlx5: E-Switch, Get reg_c0 value on CQE")
Signed-off-by: Roi Dayan <roid@mellanox.com>
Reviewed-by: Paul Blakey <paulb@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c

index ca6ac3876a1fcf062e47238e19d6e8a3c4da590d..088fb51123e27a3b4b1dc2ac541d5663de6deff9 100644 (file)
@@ -1566,6 +1566,8 @@ static int esw_create_restore_table(struct mlx5_eswitch *esw)
        esw->offloads.restore_group = g;
        esw->offloads.restore_copy_hdr_id = mod_hdr;
 
+       kvfree(flow_group_in);
+
        return 0;
 
 err_mod_hdr: