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
Clear out free'd pointers for safety.
This commit is contained in:
@@ -2108,6 +2108,10 @@ mysql_close(MYSQL *mysql)
|
||||
if (mysql->extension)
|
||||
free(mysql->extension);
|
||||
|
||||
/* Clear pointers for better safety */
|
||||
mysql->net.extension = NULL;
|
||||
mysql->extension = NULL;
|
||||
|
||||
mysql->net.pvio= 0;
|
||||
if (mysql->free_me)
|
||||
free(mysql);
|
||||
|
Reference in New Issue
Block a user