1
0
mirror of https://github.com/mariadb-corporation/mariadb-connector-c.git synced 2025-08-07 02:42:49 +03:00

check mysql->extension for NULL before referencing it

This commit is contained in:
Vladislav Vaintroub
2016-05-30 17:50:59 +00:00
parent f8aad3d879
commit ec383d59fa

View File

@@ -1846,7 +1846,7 @@ mysql_close(MYSQL *mysql)
{
if (mysql) /* Some simple safety */
{
if (mysql->extension->conn_hdlr)
if ((mysql->extension && mysql->extension->conn_hdlr)
{
MA_CONNECTION_HANDLER *p= mysql->extension->conn_hdlr;
p->plugin->close(mysql);