net/mlx5e: Fix use after free in mlx5e_fs_init()
Call mlx5e_fs_vlan_free(fs) before kvfree(fs).
Fixes: af8bbf7300
("net/mlx5e: Convert mlx5e_flow_steering member of mlx5e_priv to pointer")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
This commit is contained in:
parent
6514210b6d
commit
21234e3a84
@ -1395,10 +1395,11 @@ struct mlx5e_flow_steering *mlx5e_fs_init(const struct mlx5e_profile *profile,
|
||||
}
|
||||
|
||||
return fs;
|
||||
err_free_fs:
|
||||
kvfree(fs);
|
||||
|
||||
err_free_vlan:
|
||||
mlx5e_fs_vlan_free(fs);
|
||||
err_free_fs:
|
||||
kvfree(fs);
|
||||
err:
|
||||
return NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user