OSDN Git Service

RDMA/mlx5: Fix memory leak in case we fail to add an IB device
authorMark Bloch <markb@mellanox.com>
Mon, 11 Feb 2019 15:40:54 +0000 (17:40 +0200)
committerJason Gunthorpe <jgg@mellanox.com>
Mon, 11 Feb 2019 22:32:29 +0000 (15:32 -0700)
commitfc9e4477f924e84d7798f7a1d41401d699de1219
tree1857a84546cf61953323cea4bc2a3163075a7384
parent0da4d48d99dfdb2a69172079f6a56e22689d16ce
RDMA/mlx5: Fix memory leak in case we fail to add an IB device

Make sure the IB device is freed on failure.

Fixes: b5ca15ad7e61 ("IB/mlx5: Add proper representors support")
Signed-off-by: Mark Bloch <markb@mellanox.com>
Reviewed-by: Bodong Wang <bodong@mellanox.com>
Reviewed-by: HÃ¥kon Bugge <haakon.bugge@oracle.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/mlx5/ib_rep.c