summaryrefslogtreecommitdiff
path: root/sql-common
diff options
context:
space:
mode:
authorGeorgi Kodinov <Georgi.Kodinov@Oracle.com>2010-11-17 15:26:11 +0200
committerGeorgi Kodinov <Georgi.Kodinov@Oracle.com>2010-11-17 15:26:11 +0200
commitc6733ff655cbf2e0348cc10cf2024f5b061bf5ec (patch)
treeb0b182f5309104cf1d0c8d447b200df664c0adb9 /sql-common
parentbb642a5cc0b0d3cc7728eeb482a61dc87fe5b407 (diff)
downloadmariadb-git-c6733ff655cbf2e0348cc10cf2024f5b061bf5ec.tar.gz
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.
Diffstat (limited to 'sql-common')
-rw-r--r--sql-common/client_plugin.c4
1 files changed, 2 insertions, 2 deletions
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;
}