Skip to content

Commit 4a9d46a

Browse files
Navidemjgunthorpe
authored andcommitted
RDMA: Fix goto target to release the allocated memory
In bnxt_re_create_srq(), when ib_copy_to_udata() fails allocated memory should be released by goto fail. Fixes: 37cb11a ("RDMA/bnxt_re: Add SRQ support for Broadcom adapters") Link: https://lore.kernel.org/r/20190910222120.16517-1-navid.emamdoost@gmail.com Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Reviewed-by: Jason Gunthorpe <jgg@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
1 parent 2ac5a6d commit 4a9d46a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: drivers/infiniband/hw/bnxt_re/ib_verbs.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1398,7 +1398,7 @@ int bnxt_re_create_srq(struct ib_srq *ib_srq,
13981398
dev_err(rdev_to_dev(rdev), "SRQ copy to udata failed!");
13991399
bnxt_qplib_destroy_srq(&rdev->qplib_res,
14001400
&srq->qplib_srq);
1401-
goto exit;
1401+
goto fail;
14021402
}
14031403
}
14041404
if (nq)

0 commit comments

Comments
 (0)