IB/mlx5: Fix steering resource leak

Fix multicast flow rule leak on adding unicast rule failure.

Fixes: 038d2ef875 ('IB/mlx5: Add flow steering support')
Signed-off-by: Maor Gottlieb <maorg@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
This commit is contained in:
Maor Gottlieb 2016-08-28 14:16:30 +03:00 committed by Doug Ledford
parent eb49ab0c5f
commit 7055a29471
1 changed files with 1 additions and 0 deletions

View File

@ -1861,6 +1861,7 @@ static struct mlx5_ib_flow_handler *create_leftovers_rule(struct mlx5_ib_dev *de
&leftovers_specs[LEFTOVERS_UC].flow_attr,
dst);
if (IS_ERR(handler_ucast)) {
mlx5_del_flow_rule(handler->rule);
kfree(handler);
handler = handler_ucast;
} else {