RDMA/mlx5: Fix memory leak in mlx5_ib_create_srq() error path
authorKamal Heib <kamalheib1@gmail.com>
Tue, 10 Jul 2018 08:56:50 +0000 (11:56 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 24 Aug 2018 11:09:16 +0000 (13:09 +0200)
commit26c7588c28caafda58ed88b45912dafc240c495e
tree4f8849ec2fffc0d6401d75f43d460de4a4466d1c
parenta6629efeef9d9bbb76d9e7cdf0262ad07e9f1651
RDMA/mlx5: Fix memory leak in mlx5_ib_create_srq() error path

[ Upstream commit d63c46734c545ad0488761059004a65c46efdde3 ]

Fix memory leak in the error path of mlx5_ib_create_srq() by making sure
to free the allocated srq.

Fixes: c2b37f76485f ("IB/mlx5: Fix integer overflows in mlx5_ib_create_srq")
Signed-off-by: Kamal Heib <kamalheib1@gmail.com>
Acked-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/infiniband/hw/mlx5/srq.c