Commit 623c3f67 authored by Daniel Black's avatar Daniel Black Committed by Sergey Vojtovich

thread_group_close: release mutex in all branches

Found by Coverity scan - id 92087
parent cb870674
...@@ -979,24 +979,26 @@ static void thread_group_close(thread_group_t *thread_group) ...@@ -979,24 +979,26 @@ static void thread_group_close(thread_group_t *thread_group)
if (pipe(thread_group->shutdown_pipe)) if (pipe(thread_group->shutdown_pipe))
{ {
DBUG_VOID_RETURN; goto end;
} }
/* Wake listener */ /* Wake listener */
if (io_poll_associate_fd(thread_group->pollfd, if (io_poll_associate_fd(thread_group->pollfd,
thread_group->shutdown_pipe[0], NULL)) thread_group->shutdown_pipe[0], NULL))
{ {
DBUG_VOID_RETURN; goto end;
}
{
char c= 0;
if (write(thread_group->shutdown_pipe[1], &c, 1) < 0)
goto end;
} }
char c= 0;
if (write(thread_group->shutdown_pipe[1], &c, 1) < 0)
DBUG_VOID_RETURN;
/* Wake all workers. */ /* Wake all workers. */
while(wake_thread(thread_group) == 0) while(wake_thread(thread_group) == 0)
{ {
} }
end:
mysql_mutex_unlock(&thread_group->mutex); mysql_mutex_unlock(&thread_group->mutex);
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment