diff options
author | Navid Emamdoost <navid.emamdoost@gmail.com> | 2019-09-11 01:21:19 +0300 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2019-09-13 22:55:55 +0300 |
commit | 4a9d46a9fe14401f21df69cea97c62396d5fb053 (patch) | |
tree | 1bcbe3047029c5063963429dcefbff5d19dcf6ec /drivers/infiniband | |
parent | 2ac5a6d3a917755919d97c89f8aa74e4ed958557 (diff) | |
download | linux-4a9d46a9fe14401f21df69cea97c62396d5fb053.tar.xz |
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: 37cb11acf1f7 ("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>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/hw/bnxt_re/ib_verbs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/bnxt_re/ib_verbs.c b/drivers/infiniband/hw/bnxt_re/ib_verbs.c index f9e97d0cc459..b4149dc9e824 100644 --- a/drivers/infiniband/hw/bnxt_re/ib_verbs.c +++ b/drivers/infiniband/hw/bnxt_re/ib_verbs.c @@ -1398,7 +1398,7 @@ int bnxt_re_create_srq(struct ib_srq *ib_srq, dev_err(rdev_to_dev(rdev), "SRQ copy to udata failed!"); bnxt_qplib_destroy_srq(&rdev->qplib_res, &srq->qplib_srq); - goto exit; + goto fail; } } if (nq) |