lib/thread: free cpumask on spdk_thread_create() failure
Change-Id: I2e814aa3188639edff47b6bb3f56609417e6c034 Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/451791 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
6f155b15be
commit
bbc49ab42f
@ -218,6 +218,7 @@ spdk_thread_create(const char *name, struct spdk_cpuset *cpumask)
|
||||
thread->messages = spdk_ring_create(SPDK_RING_TYPE_MP_SC, 65536, SPDK_ENV_SOCKET_ID_ANY);
|
||||
if (!thread->messages) {
|
||||
SPDK_ERRLOG("Unable to allocate memory for message ring\n");
|
||||
spdk_cpuset_free(thread->cpumask);
|
||||
free(thread);
|
||||
return NULL;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user