net/mlx5: Fix memory leak on flow table creation error flow
authorRoi Dayan <roid@nvidia.com>
Tue, 12 Jan 2021 12:04:29 +0000 (14:04 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Feb 2021 22:26:00 +0000 (23:26 +0100)
commitdbc13deeec6a84b6ea749b2f16b3b3bff18e5689
tree557d018ea2b60234b2ead96ac3e7caf510ac9e3c
parent02ef126a002df6215b8f08140a77154b13691225
net/mlx5: Fix memory leak on flow table creation error flow

[ Upstream commit 487c6ef81eb98d0a43cb08be91b1fcc9b4250626 ]

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: 693c6883bbc4 ("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>
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c