From c4afc041d04ab03ed64846f0aba845a15ff3e79b Mon Sep 17 00:00:00 2001 From: Georgi Kodinov Date: Wed, 17 Nov 2010 15:26:11 +0200 Subject: Bug #57559: Crash in Client plugin api The plugin code was releasing the plugin and only then was reporting an error referencing it. Fixed by first reporting an error and then freeing up the plugin. --- sql-common/client_plugin.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sql-common') diff --git a/sql-common/client_plugin.c b/sql-common/client_plugin.c index bfeea40b401..6114d95cd73 100644 --- a/sql-common/client_plugin.c +++ b/sql-common/client_plugin.c @@ -176,11 +176,11 @@ err2: if (plugin->deinit) plugin->deinit(); err1: - if (dlhandle) - dlclose(dlhandle); set_mysql_extended_error(mysql, CR_AUTH_PLUGIN_CANNOT_LOAD, unknown_sqlstate, ER(CR_AUTH_PLUGIN_CANNOT_LOAD), plugin->name, errmsg); + if (dlhandle) + dlclose(dlhandle); return NULL; } -- cgit v1.2.1