Commit e433cb33 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 44d221d7
......@@ -6930,7 +6930,9 @@ int finalize_schema_table(st_plugin_int *plugin)
ST_SCHEMA_TABLE *schema_table= (ST_SCHEMA_TABLE *)plugin->data;
DBUG_ENTER("finalize_schema_table");
if (schema_table && plugin->plugin->deinit)
if (schema_table)
{
if (plugin->plugin->deinit)
{
DBUG_PRINT("info", ("Deinitializing plugin: '%s'", plugin->name.str));
if (plugin->plugin->deinit(NULL))
......@@ -6938,6 +6940,7 @@ int finalize_schema_table(st_plugin_int *plugin)
DBUG_PRINT("warning", ("Plugin '%s' deinit function returned error.",
plugin->name.str));
}
}
my_free(schema_table, MYF(0));
}
DBUG_RETURN(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