From 9ee840cd0a86145e014252fe106d9798b2abc08b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Fri, 13 Oct 2017 22:22:03 +0300 Subject: [PATCH] mariabackup: Properly call os_thread_exit() with detach=true There is no call to os_thread_join(), so we should detach the thread handles in order to avoid any resource leaks. --- extra/mariabackup/xtrabackup.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/extra/mariabackup/xtrabackup.cc b/extra/mariabackup/xtrabackup.cc index 4b6d0d2cc55..6bc506f14d0 100644 --- a/extra/mariabackup/xtrabackup.cc +++ b/extra/mariabackup/xtrabackup.cc @@ -2460,7 +2460,7 @@ static os_thread_ret_t log_copying_thread(void*) log_copying_running = false; my_thread_end(); - os_thread_exit(NULL); + os_thread_exit(); return(0); } @@ -2483,7 +2483,7 @@ static os_thread_ret_t io_watching_thread(void*) io_watching_thread_running = false; - os_thread_exit(NULL); + os_thread_exit(); return(0); } @@ -2523,7 +2523,7 @@ data_copy_thread_func( pthread_mutex_unlock(&ctxt->count_mutex); my_thread_end(); - os_thread_exit(NULL); + os_thread_exit(); OS_THREAD_DUMMY_RETURN; }