nvmf/rdma: fix missing return statement

In case of failure during resource allocation within poll_group_create
there is a lack of return statement which could lead to NULL ptr
dereference.

Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/463195 (master)

(cherry picked from commit db0c7f6a4f)
Change-Id: I84abe64a1843117d76b97e62656bdfc4fe2b35d8
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467127
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: <jacek.kalwas@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
Jacek Kalwas 2019-07-25 20:23:13 +02:00 committed by Jim Harris
parent 7c8cb1b6fd
commit 9d0271c815

View File

@ -3052,6 +3052,7 @@ spdk_nvmf_rdma_poll_group_create(struct spdk_nvmf_transport *transport)
SPDK_ERRLOG("Unable to allocate resources for shared receive queue.\n"); SPDK_ERRLOG("Unable to allocate resources for shared receive queue.\n");
spdk_nvmf_rdma_poll_group_destroy(&rgroup->group); spdk_nvmf_rdma_poll_group_destroy(&rgroup->group);
pthread_mutex_unlock(&rtransport->lock); pthread_mutex_unlock(&rtransport->lock);
return NULL;
} }
} }