nvme/rdma: fix mem_map allocation failure check
Change-Id: I206787234bc6d83d8b9694a8263626c56dc07bc7 Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com> Reviewed-on: https://review.gerrithub.io/422563 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This commit is contained in:
parent
26628773d3
commit
a6c89adf09
@ -660,7 +660,7 @@ nvme_rdma_register_mem(struct nvme_rdma_qpair *rqpair)
|
||||
mr_map->ref = 1;
|
||||
mr_map->pd = pd;
|
||||
mr_map->map = spdk_mem_map_alloc((uint64_t)NULL, nvme_rdma_mr_map_notify, pd);
|
||||
if (mr_map == NULL) {
|
||||
if (mr_map->map == NULL) {
|
||||
SPDK_ERRLOG("spdk_mem_map_alloc() failed\n");
|
||||
free(mr_map);
|
||||
pthread_mutex_unlock(&g_rdma_mr_maps_mutex);
|
||||
|
Loading…
Reference in New Issue
Block a user