diff options
author | Sergei Golubchik <sergii@pisem.net> | 2011-04-25 17:22:25 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2011-04-25 17:22:25 +0200 |
commit | 0accbd0364e0333e0b119aa9ce93e34ded9df6cb (patch) | |
tree | bdf0738c29dc1f57fbfba3a1754524e238f15b52 /mysys/my_thr_init.c | |
parent | 37f87d73ae8dc6c30594867b40a5d70159acf63c (diff) | |
download | mariadb-git-0accbd0364e0333e0b119aa9ce93e34ded9df6cb.tar.gz |
lots of post-merge changes
Diffstat (limited to 'mysys/my_thr_init.c')
-rw-r--r-- | mysys/my_thr_init.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mysys/my_thr_init.c b/mysys/my_thr_init.c index 7b895149d84..a2d89c79b4e 100644 --- a/mysys/my_thr_init.c +++ b/mysys/my_thr_init.c @@ -391,10 +391,7 @@ void my_thread_end(void) mysql_cond_destroy(&tmp->suspend); #endif mysql_mutex_destroy(&tmp->mutex); - TRASH(tmp, sizeof(*tmp)); - free(tmp); -#warning why monty added pthread_setspecific(THR_KEY_mysys,0) here? /* Decrement counter for number of running threads. We are using this in my_thread_global_end() to wait until all threads have called @@ -406,6 +403,9 @@ void my_thread_end(void) if (--THR_thread_count == 0) mysql_cond_signal(&THR_COND_threads); mysql_mutex_unlock(&THR_LOCK_threads); + + TRASH(tmp, sizeof(*tmp)); + free(tmp); } pthread_setspecific(THR_KEY_mysys,0); } |