summaryrefslogtreecommitdiff
path: root/ext/mysqlnd/mysqlnd_auth.c
diff options
context:
space:
mode:
authorAndrey Hristov <andrey@php.net>2015-11-10 12:34:27 +0100
committerAndrey Hristov <andrey@php.net>2015-11-12 16:19:16 +0100
commitc286d7075dc46b0ce6442adb7b632bed99e16bdb (patch)
tree17be41180439f587af2ae35d8a62f3ab2491867c /ext/mysqlnd/mysqlnd_auth.c
parenta530ecff978cbf2e67a774cae40899d3934c163a (diff)
downloadphp-git-c286d7075dc46b0ce6442adb7b632bed99e16bdb.tar.gz
MNDR:
- move from char* + len to MYSQLND_STRING - add some more const modifiers
Diffstat (limited to 'ext/mysqlnd/mysqlnd_auth.c')
-rw-r--r--ext/mysqlnd/mysqlnd_auth.c14
1 files changed, 7 insertions, 7 deletions
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);