Skip to content

Commit

Permalink
Fix two memory leaks on SQLite3 prepared statements
Browse files Browse the repository at this point in the history
The leaks are exercised during table regeneration at
'MySQL_HostGroups_Manager::commit'.
  • Loading branch information
JavierJF committed Apr 10, 2024
1 parent ea477ab commit ecff8d0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/MySQL_HostGroups_Manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit ecff8d0

Please sign in to comment.