threadpool: release mutex on io_poll_create failure

Also use the group pointer previously allocated.
This commit is contained in:
Daniel Black 2018-01-30 16:30:39 +11:00 committed by Vladislav Vaintroub
commit b56f9fbe2f

View file

@ -1698,10 +1698,9 @@ int TP_pool_generic::set_pool_size(uint size)
if(!success)
{
sql_print_error("io_poll_create() failed, errno=%d\n", errno);
break;
}
}
mysql_mutex_unlock(&all_groups[i].mutex);
mysql_mutex_unlock(&group->mutex);
if (!success)
{
group_count= i;