mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 05:22:25 +01:00
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.
This commit is contained in:
parent
fba50f8401
commit
1087cfc4d5
1 changed files with 8 additions and 5 deletions
|
@ -6930,13 +6930,16 @@ 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)
|
||||
{
|
||||
DBUG_PRINT("info", ("Deinitializing plugin: '%s'", plugin->name.str));
|
||||
if (plugin->plugin->deinit(NULL))
|
||||
if (plugin->plugin->deinit)
|
||||
{
|
||||
DBUG_PRINT("warning", ("Plugin '%s' deinit function returned error.",
|
||||
plugin->name.str));
|
||||
DBUG_PRINT("info", ("Deinitializing plugin: '%s'", 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));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue