From 625daa9cd323c2864cf5ee19e67f0c253c2c9174 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Jaramago=20Fern=C3=A1ndez?= Date: Thu, 9 Sep 2021 18:27:09 +0200 Subject: [PATCH] Fixed check for 'client_host' error count and added missing free --- lib/MySQL_Thread.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/MySQL_Thread.cpp b/lib/MySQL_Thread.cpp index be65a250c..9e2a1f406 100644 --- a/lib/MySQL_Thread.cpp +++ b/lib/MySQL_Thread.cpp @@ -3993,9 +3993,10 @@ void MySQL_Thread::listener_handle_new_connection(MySQL_Data_Stream *myds, unsig GloMTH->find_client_host_cache(addr); if ( client_host_entry.updated_at != 0 && - client_host_entry.error_count == static_cast(mysql_thread___client_host_error_counts) + client_host_entry.error_count >= static_cast(mysql_thread___client_host_error_counts) ) { close(c); + free(addr); status_variables.stvar[st_var_client_host_error_killed_connections] += 1; return; }