Commit 54b61b8b authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

LP9091416: destroy timer mutex when threadpool scheduler shuts down.

Fixes valgrind warning.
parent ecad00bc
......@@ -470,7 +470,10 @@ static void* timer_thread(void *param)
mysql_mutex_lock(&timer->mutex);
int err = mysql_cond_timedwait(&timer->cond, &timer->mutex, &ts);
if (timer->shutdown)
{
mysql_mutex_unlock(&timer->mutex);
break;
}
if (err == ETIMEDOUT)
{
timer->current_microtime= microsecond_interval_timer();
......@@ -488,6 +491,8 @@ static void* timer_thread(void *param)
}
mysql_mutex_unlock(&timer->mutex);
}
mysql_mutex_destroy(&timer->mutex);
DBUG_POP();
my_thread_end();
return NULL;
......
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