From c286d7075dc46b0ce6442adb7b632bed99e16bdb Mon Sep 17 00:00:00 2001 From: Andrey Hristov Date: Tue, 10 Nov 2015 12:34:27 +0100 Subject: MNDR: - move from char* + len to MYSQLND_STRING - add some more const modifiers --- ext/mysqlnd/mysqlnd_auth.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'ext/mysqlnd/mysqlnd_auth.c') diff --git a/ext/mysqlnd/mysqlnd_auth.c b/ext/mysqlnd/mysqlnd_auth.c index 01868336dd..fd9d174c12 100644 --- a/ext/mysqlnd/mysqlnd_auth.c +++ b/ext/mysqlnd/mysqlnd_auth.c @@ -271,18 +271,18 @@ mysqlnd_auth_change_user(MYSQLND_CONN_DATA * const conn, } if (ret == PASS) { char * tmp = NULL; - /* if we get conn->user as parameter and then we first free it, then estrndup it, we will crash */ + /* if we get conn->username as parameter and then we first free it, then estrndup it, we will crash */ tmp = mnd_pestrndup(user, user_len, conn->persistent); - if (conn->user) { - mnd_pefree(conn->user, conn->persistent); + if (conn->username.s) { + mnd_pefree(conn->username.s, conn->persistent); } - conn->user = tmp; + conn->username.s = tmp; tmp = mnd_pestrdup(passwd, conn->persistent); - if (conn->passwd) { - mnd_pefree(conn->passwd, conn->persistent); + if (conn->password.s) { + mnd_pefree(conn->password.s, conn->persistent); } - conn->passwd = tmp; + conn->password.s = tmp; if (conn->last_message.s) { mnd_pefree(conn->last_message.s, conn->persistent); -- cgit v1.2.1