net/mlx5: Eswitch, Use 'kvfree()' for memory allocated by 'kvzalloc()'
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Thu, 17 May 2018 00:49:01 +0000 (17:49 -0700)
committerSaeed Mahameed <saeedm@mellanox.com>
Thu, 17 May 2018 00:49:01 +0000 (17:49 -0700)
When 'kvzalloc()' is used to allocate memory, 'kvfree()' must be used to
free it.

Fixes: fed9ce22bf8ae ("net/mlx5: E-Switch, Add API to create vport rx rules")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c

index 35e256eb2f6e40de5cc4a78fed19327fafacec7c..b123f8a52ad8c1b30f11095a6029395ae8d7df1d 100644 (file)
@@ -663,7 +663,7 @@ static int esw_create_vport_rx_group(struct mlx5_eswitch *esw)
 
        esw->offloads.vport_rx_group = g;
 out:
-       kfree(flow_group_in);
+       kvfree(flow_group_in);
        return err;
 }