OSDN Git Service

net/mlx5: Fix leak upon failure of rule creation
authorMaor Gottlieb <maorg@nvidia.com>
Wed, 20 Jan 2021 15:41:18 +0000 (17:41 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Tue, 2 Feb 2021 07:02:01 +0000 (23:02 -0800)
commita5bfe6b4675e0eefbd9418055b5cc6e89af27eb4
tree9a1c3584aaf3a8715959153446a893f64ee295f6
parented5e83a3c02948dad9dc4e68fb4e535baa5da630
net/mlx5: Fix leak upon failure of rule creation

When creation of a new rule that requires allocation of an FTE fails,
need to call to tree_put_node on the FTE in order to release its'
resource.

Fixes: cefc23554fc2 ("net/mlx5: Fix FTE cleanup")
Signed-off-by: Maor Gottlieb <maorg@nvidia.com>
Reviewed-by: Alaa Hleihel <alaa@nvidia.com>
Reviewed-by: Mark Bloch <mbloch@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c