nvme/rdma: make sure we free resources in error path.
Not sure how we missed this. Signed-off-by: Seth Howell <seth.howell@intel.com> Change-Id: If920cb3a7708c33032e1da28c564d4c28ddafdf4 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1122 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This commit is contained in:
parent
3b99ee9929
commit
2248e52150
@ -1630,6 +1630,7 @@ nvme_rdma_ctrlr_create_qpair(struct spdk_nvme_ctrlr *ctrlr,
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "rc =%d\n", rc);
|
||||
if (rc) {
|
||||
SPDK_ERRLOG("Unable to allocate rqpair RDMA requests\n");
|
||||
free(rqpair);
|
||||
return NULL;
|
||||
}
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "RDMA requests allocated\n");
|
||||
@ -1638,6 +1639,8 @@ nvme_rdma_ctrlr_create_qpair(struct spdk_nvme_ctrlr *ctrlr,
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "rc =%d\n", rc);
|
||||
if (rc < 0) {
|
||||
SPDK_ERRLOG("Unable to allocate rqpair RDMA responses\n");
|
||||
nvme_rdma_free_reqs(rqpair);
|
||||
free(rqpair);
|
||||
return NULL;
|
||||
}
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "RDMA responses allocated\n");
|
||||
|
Loading…
Reference in New Issue
Block a user