net/mlx5e: Use kfree() to free fd->g in accel_fs_tcp_create_groups()
authorDenis Efremov <efremov@linux.com>
Mon, 21 Sep 2020 16:23:45 +0000 (19:23 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Wed, 23 Sep 2020 22:44:38 +0000 (15:44 -0700)
Memory ft->g in accel_fs_tcp_create_groups() is allocaed with kcalloc().
It's excessive to free ft->g with kvfree(). Use kfree() instead.

Signed-off-by: Denis Efremov <efremov@linux.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c

index 4cdd9ea..97f1594 100644 (file)
@@ -191,7 +191,7 @@ static int accel_fs_tcp_create_groups(struct mlx5e_flow_table *ft,
        ft->g = kcalloc(MLX5E_ACCEL_FS_TCP_NUM_GROUPS, sizeof(*ft->g), GFP_KERNEL);
        in = kvzalloc(inlen, GFP_KERNEL);
        if  (!in || !ft->g) {
-               kvfree(ft->g);
+               kfree(ft->g);
                kvfree(in);
                return -ENOMEM;
        }