nvmf/rdma: free list of devices

In case of failure during pd or map allocation freeing list of devices
was missing.

Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: If62f7b072f3894fd1a7e856c19b4ea51646dd20e
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462079
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
Jacek Kalwas 2019-07-16 23:43:24 +02:00 committed by Changpeng Liu
parent 002d49fe17
commit 0d4a5f7e69

View File

@ -2289,8 +2289,8 @@ spdk_nvmf_rdma_create(struct spdk_nvmf_transport_opts *opts)
if (!device->pd) {
SPDK_ERRLOG("Unable to allocate protection domain.\n");
spdk_nvmf_rdma_destroy(&rtransport->transport);
return NULL;
rc = -ENOMEM;
break;
}
assert(device->map == NULL);
@ -2298,8 +2298,8 @@ spdk_nvmf_rdma_create(struct spdk_nvmf_transport_opts *opts)
device->map = spdk_mem_map_alloc(0, &g_nvmf_rdma_map_ops, device->pd);
if (!device->map) {
SPDK_ERRLOG("Unable to allocate memory map for listen address\n");
spdk_nvmf_rdma_destroy(&rtransport->transport);
return NULL;
rc = -ENOMEM;
break;
}
assert(device->map != NULL);