Commit a758479c authored by Marko Mäkelä's avatar Marko Mäkelä

Post-fix for MDEV-11688 fil_crypt_threads_end() tries to create threads

fil_crypt_threads_cleanup(): Do nothing if nothing was initialized.
parent a0d396fd
...@@ -2397,6 +2397,9 @@ void ...@@ -2397,6 +2397,9 @@ void
fil_crypt_threads_cleanup() fil_crypt_threads_cleanup()
/*=======================*/ /*=======================*/
{ {
if (!fil_crypt_threads_inited) {
return;
}
os_event_destroy(fil_crypt_event); os_event_destroy(fil_crypt_event);
os_event_destroy(fil_crypt_threads_event); os_event_destroy(fil_crypt_threads_event);
mutex_free(&fil_crypt_threads_mutex); mutex_free(&fil_crypt_threads_mutex);
......
...@@ -2465,8 +2465,9 @@ void ...@@ -2465,8 +2465,9 @@ void
fil_crypt_threads_end() fil_crypt_threads_end()
/*===================*/ /*===================*/
{ {
/* stop threads */ if (fil_crypt_threads_inited) {
fil_crypt_set_thread_cnt(0); fil_crypt_set_thread_cnt(0);
}
} }
/********************************************************************* /*********************************************************************
...@@ -2476,6 +2477,9 @@ void ...@@ -2476,6 +2477,9 @@ void
fil_crypt_threads_cleanup() fil_crypt_threads_cleanup()
/*=======================*/ /*=======================*/
{ {
if (!fil_crypt_threads_inited) {
return;
}
os_event_free(fil_crypt_event); os_event_free(fil_crypt_event);
os_event_free(fil_crypt_threads_event); os_event_free(fil_crypt_threads_event);
mutex_free(&fil_crypt_threads_mutex); mutex_free(&fil_crypt_threads_mutex);
......
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