mirror of
https://github.com/torvalds/linux.git
synced 2024-12-04 18:13:04 +00:00
net/mlx5e: Use kvfree() in mlx5e_accel_fs_tcp_create()
'accel_tcp' is allocated by kvzalloc(), which should freed by kvfree().
Fixes: f52f2faee5
("net/mlx5e: Introduce flow steering API")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
This commit is contained in:
parent
bc59c7d326
commit
406e6db7fc
@ -365,7 +365,7 @@ void mlx5e_accel_fs_tcp_destroy(struct mlx5e_flow_steering *fs)
|
||||
for (i = 0; i < ACCEL_FS_TCP_NUM_TYPES; i++)
|
||||
accel_fs_tcp_destroy_table(fs, i);
|
||||
|
||||
kfree(accel_tcp);
|
||||
kvfree(accel_tcp);
|
||||
mlx5e_fs_set_accel_tcp(fs, NULL);
|
||||
}
|
||||
|
||||
@ -397,7 +397,7 @@ int mlx5e_accel_fs_tcp_create(struct mlx5e_flow_steering *fs)
|
||||
err_destroy_tables:
|
||||
while (--i >= 0)
|
||||
accel_fs_tcp_destroy_table(fs, i);
|
||||
kfree(accel_tcp);
|
||||
kvfree(accel_tcp);
|
||||
mlx5e_fs_set_accel_tcp(fs, NULL);
|
||||
return err;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user