diff options
author | Qianqian Bu <qibu@microsoft.com> | 2020-04-03 15:44:41 +0800 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-04-03 10:05:16 +0200 |
commit | ee21657a6a2d64e12ba03eae70dd7b7cb2569d82 (patch) | |
tree | b86146f2df7b9c2318b493e8852a77e099e74fdd | |
parent | cf68bc413bd7548643058a63dbf4d907346d184c (diff) | |
download | php-git-ee21657a6a2d64e12ba03eae70dd7b7cb2569d82.tar.gz |
Fix incorrect free for last_message
In commit a7305eb539596e175bd6c3ae9a20953358c5d677 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
-rw-r--r-- | ext/mysqlnd/mysqlnd_auth.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/mysqlnd/mysqlnd_auth.c b/ext/mysqlnd/mysqlnd_auth.c index 30ef6639ca..2c50c1fdc5 100644 --- a/ext/mysqlnd/mysqlnd_auth.c +++ b/ext/mysqlnd/mysqlnd_auth.c @@ -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); |