mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 03:40:35 +09:00
RDMA: Fix goto target to release the allocated memory
commit4a9d46a9feupstream. In bnxt_re_create_srq(), when ib_copy_to_udata() fails allocated memory should be released by goto fail. Fixes:37cb11acf1("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> Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
6e41dd9731
commit
d203ff6a30
@@ -1446,7 +1446,7 @@ struct ib_srq *bnxt_re_create_srq(struct ib_pd *ib_pd,
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user