From 22ae3843db6c8b2a84ca5d16cd99025abb52cc27 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sat, 20 Jan 2018 17:59:11 +0100 Subject: Correct TRASH() macro usage TRASH was mapped to TRASH_FREE and was supposed to be used for memory that should not be accessed anymore, while TRASH_ALLOC() is to be used for uninitialized but to-be-used memory. But sometimes TRASH() was used in the latter sense. Remove TRASH() macro, always use explicit TRASH_ALLOC() or TRASH_FREE(). --- mysys/my_thr_init.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'mysys/my_thr_init.c') diff --git a/mysys/my_thr_init.c b/mysys/my_thr_init.c index aefd3564185..55ee1db657e 100644 --- a/mysys/my_thr_init.c +++ b/mysys/my_thr_init.c @@ -423,8 +423,6 @@ 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); } } -- cgit v1.2.1