From ecff8d0cc2232761c279973a1cd1e8e31a2bb765 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Jaramago=20Fern=C3=A1ndez?= Date: Wed, 10 Apr 2024 12:01:58 +0200 Subject: [PATCH] Fix two memory leaks on SQLite3 prepared statements The leaks are exercised during table regeneration at 'MySQL_HostGroups_Manager::commit'. --- lib/MySQL_HostGroups_Manager.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/MySQL_HostGroups_Manager.cpp b/lib/MySQL_HostGroups_Manager.cpp index b185416af..d1f6188ec 100644 --- a/lib/MySQL_HostGroups_Manager.cpp +++ b/lib/MySQL_HostGroups_Manager.cpp @@ -7663,6 +7663,7 @@ void MySQL_HostGroups_Manager::generate_mysql_hostgroup_attributes_table() { } } + (*proxy_sqlite3_finalize)(statement); delete incoming_hostgroup_attributes; incoming_hostgroup_attributes=NULL; } @@ -7717,6 +7718,7 @@ void MySQL_HostGroups_Manager::generate_mysql_servers_ssl_params_table() { string MapKey = MSSP.getMapKey(rand_del); Servers_SSL_Params_map.emplace(MapKey, MSSP); } + (*proxy_sqlite3_finalize)(statement); delete incoming_mysql_servers_ssl_params; incoming_mysql_servers_ssl_params=NULL; }