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

Fixed leak in ma_tls_read/write

This commit is contained in:
Georg Richter
2018-07-31 09:39:03 +02:00
parent f69eaf04dd
commit f1fd014a15
3 changed files with 7 additions and 7 deletions

View File

@@ -1745,7 +1745,7 @@ my_bool STDCALL mysql_change_user(MYSQL *mysql, const char *user,
free(s_passwd);
free(s_db);
if (db && !(mysql->db= strdup(db)))
if (!mysql->db && db && !(mysql->db= strdup(db)))
{
SET_CLIENT_ERROR(mysql, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0);
rc= 1;