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)
committerJason Gunthorpe <jgg@mellanox.com>
Wed, 11 Jul 2018 20:16:13 +0000 (14:16 -0600)
commitd63c46734c545ad0488761059004a65c46efdde3
tree71e29caa5e21937df10c67a67a859bbd703d1294
parentfe48aecb4df837540f13b5216f27ddb306aaf4b9
RDMA/mlx5: Fix memory leak in mlx5_ib_create_srq() error path

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>
drivers/infiniband/hw/mlx5/srq.c