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:12:38 +0000 (13:12 +0200)
commit199b59a524af7f615087d40ff20bd159b1da26d5
tree0d6863382d77304f0832b8347f479120e3165447
parent8e4449f431d8d57cf56f279ab784722b78f4acb3
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