From 9bfd45bd3222390e99746c59b69aba0aed210365 Mon Sep 17 00:00:00 2001 From: Yubao Liu Date: Fri, 17 May 2019 11:50:26 +0800 Subject: [PATCH] fix crash again on Get_Memory_Stats() Fixed https://github.com/sysown/proxysql/issues/2037. --- lib/MySQL_Thread.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/MySQL_Thread.cpp b/lib/MySQL_Thread.cpp index 2b011aa3c..9d357bd5a 100644 --- a/lib/MySQL_Thread.cpp +++ b/lib/MySQL_Thread.cpp @@ -4541,7 +4541,6 @@ SQLite3_result * MySQL_Threads_Handler::SQL3_GlobalStatus(bool _memory) { void MySQL_Threads_Handler::Get_Memory_Stats() { unsigned int i; unsigned int j; - MySQL_Thread *thr=NULL; j=num_threads; #ifdef IDLE_THREADS if (GloVars.global.idle_threads) { @@ -4549,17 +4548,17 @@ void MySQL_Threads_Handler::Get_Memory_Stats() { } #endif // IDLE_THREADS for (i=0;ithread_mutex); thr->Get_Memory_Stats(); pthread_mutex_unlock(&thr->thread_mutex);