mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 02:21:52 +09:00
net/mlx5: Fix memory leak on flow table creation error flow
[ Upstream commit487c6ef81e] When we create the ft object we also init rhltable in ft->fgs_hash. So in error flow before kfree of ft we need to destroy that rhltable. Fixes:693c6883bb("net/mlx5: Add hash table for flow groups in flow table") Signed-off-by: Roi Dayan <roid@nvidia.com> Reviewed-by: Maor Dickman <maord@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
4c919b215b
commit
d62665cac6
@@ -1141,6 +1141,7 @@ static struct mlx5_flow_table *__mlx5_create_flow_table(struct mlx5_flow_namespa
|
||||
destroy_ft:
|
||||
root->cmds->destroy_flow_table(root, ft);
|
||||
free_ft:
|
||||
rhltable_destroy(&ft->fgs_hash);
|
||||
kfree(ft);
|
||||
unlock_root:
|
||||
mutex_unlock(&root->chain_lock);
|
||||
|
||||
Reference in New Issue
Block a user