Fix incorrect free for last_message

In commit a7305eb539 the last_message
field of the connection object was changed to be always non-persistent.
But there is a place on change_user path that still treats it
depending on conn->persistent flag. This will cause PHP crash after
com_change_user success when there is last_message set
This commit is contained in:
Qianqian Bu 2020-04-03 15:44:41 +08:00 committed by Nikita Popov
parent cf68bc413b
commit ee21657a6a

View File

@ -481,7 +481,7 @@ mysqlnd_auth_change_user(MYSQLND_CONN_DATA * const conn,
conn->password.s = tmp;
if (conn->last_message.s) {
mnd_pefree(conn->last_message.s, conn->persistent);
mnd_efree(conn->last_message.s);
conn->last_message.s = NULL;
}
UPSERT_STATUS_RESET(conn->upsert_status);