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
commitc4afc041d04ab03ed64846f0aba845a15ff3e79b (patch)
treeb0b182f5309104cf1d0c8d447b200df664c0adb9 /sql-common
parent376090caaad39444784f33895fb9aa072395cd6f (diff)
downloadmariadb-git-c4afc041d04ab03ed64846f0aba845a15ff3e79b.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;
}