[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20190910222120.16517-1-navid.emamdoost@gmail.com>
Date: Tue, 10 Sep 2019 17:21:19 -0500
From: Navid Emamdoost <navid.emamdoost@...il.com>
To: unlisted-recipients:; (no To-header on input)
Cc: emamd001@....edu, smccaman@....edu, kjlu@....edu,
Navid Emamdoost <navid.emamdoost@...il.com>,
Selvin Xavier <selvin.xavier@...adcom.com>,
Devesh Sharma <devesh.sharma@...adcom.com>,
Somnath Kotur <somnath.kotur@...adcom.com>,
Sriharsha Basavapatna <sriharsha.basavapatna@...adcom.com>,
Doug Ledford <dledford@...hat.com>,
Jason Gunthorpe <jgg@...pe.ca>, linux-rdma@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] 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.
Signed-off-by: Navid Emamdoost <navid.emamdoost@...il.com>
---
drivers/infiniband/hw/bnxt_re/ib_verbs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/infiniband/hw/bnxt_re/ib_verbs.c b/drivers/infiniband/hw/bnxt_re/ib_verbs.c
index 098ab883733e..4a91ffe2c676 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)
--
2.17.1
Powered by blists - more mailing lists