mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-25 07:51:28 +00:00
iscsi-scst: fix ENOMEM path
In an error path in iscsi_threads_pool_get(), when a new pool cannot be allocated, if there is a pool on iscsi_thread_pools_list, it passes that back as an alternative, so return zero in that case. Signed-off-by: David Butterfield <dab21774@gmail.com> git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7143 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -4240,7 +4240,7 @@ create:
|
||||
if (p == NULL) {
|
||||
PRINT_ERROR("Unable to allocate iSCSI thread pool (size %zd)",
|
||||
sizeof(*p));
|
||||
res = -ENOMEM;
|
||||
res = 0;
|
||||
if (!list_empty(&iscsi_thread_pools_list)) {
|
||||
PRINT_WARNING("%s", "Using global iSCSI thread pool "
|
||||
"instead");
|
||||
|
||||
Reference in New Issue
Block a user