You've already forked mariadb-connector-c
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:
@@ -1846,7 +1846,7 @@ mysql_close(MYSQL *mysql)
|
|||||||
{
|
{
|
||||||
if (mysql) /* Some simple safety */
|
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;
|
MA_CONNECTION_HANDLER *p= mysql->extension->conn_hdlr;
|
||||||
p->plugin->close(mysql);
|
p->plugin->close(mysql);
|
||||||
|
Reference in New Issue
Block a user