Commit 1087cfc4 authored by Ramil Kalimullin's avatar Ramil Kalimullin

Fix for bug #54253: memory leak when using I_S plugins w/o deinit method

Free memory allocated by the server for all plugins,
with or without deinit() method.
parent fba50f84
...@@ -6930,13 +6930,16 @@ int finalize_schema_table(st_plugin_int *plugin) ...@@ -6930,13 +6930,16 @@ int finalize_schema_table(st_plugin_int *plugin)
ST_SCHEMA_TABLE *schema_table= (ST_SCHEMA_TABLE *)plugin->data; ST_SCHEMA_TABLE *schema_table= (ST_SCHEMA_TABLE *)plugin->data;
DBUG_ENTER("finalize_schema_table"); DBUG_ENTER("finalize_schema_table");
if (schema_table && plugin->plugin->deinit) if (schema_table)
{ {
DBUG_PRINT("info", ("Deinitializing plugin: '%s'", plugin->name.str)); if (plugin->plugin->deinit)
if (plugin->plugin->deinit(NULL))
{ {
DBUG_PRINT("warning", ("Plugin '%s' deinit function returned error.", DBUG_PRINT("info", ("Deinitializing plugin: '%s'", plugin->name.str));
plugin->name.str)); if (plugin->plugin->deinit(NULL))
{
DBUG_PRINT("warning", ("Plugin '%s' deinit function returned error.",
plugin->name.str));
}
} }
my_free(schema_table, MYF(0)); my_free(schema_table, MYF(0));
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment