Skip to contentSkip to conversation

RDMA: fix goto target to release the allocated memory

PATCH New Navid Emamdoost 1 participant 1 message Sep 10, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drivers/infiniband/hw/bnxt_re/ib_verbs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/hw/bnxt_re/ib_verbs.c +1 -1
index 098ab883733e..4a91ffe2c676 100644
@@ -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)
Signature · 1 line
2.17.1