nvme/rdma: Fix rdma ctrlr creating qpair memory leak

Change-Id: Ie94cacac0b8dcf90b0243e8d568bb728dc7d3045
Signed-off-by: Mao Jiang <maox.jiang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6126
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Mellanox Build Bot
This commit is contained in:
Mao Jiang 2021-01-28 09:44:53 +08:00 committed by Tomasz Zawadzki
parent a8104d66d9
commit 6b3ec9683e

View File

@ -1615,6 +1615,7 @@ nvme_rdma_ctrlr_create_qpair(struct spdk_nvme_ctrlr *ctrlr,
qpair = &rqpair->qpair; qpair = &rqpair->qpair;
rc = nvme_qpair_init(qpair, qid, ctrlr, qprio, num_requests); rc = nvme_qpair_init(qpair, qid, ctrlr, qprio, num_requests);
if (rc != 0) { if (rc != 0) {
nvme_rdma_free(rqpair);
return NULL; return NULL;
} }