summaryrefslogtreecommitdiff
path: root/ext/mysqlnd/mysqlnd_net.c
diff options
context:
space:
mode:
authorXinchen Hui <laruence@php.net>2014-08-14 11:52:46 +0800
committerXinchen Hui <laruence@php.net>2014-08-14 11:52:46 +0800
commitbfc1ae07bec3bda6dc0522da50b35ba093d4247c (patch)
treece6d954be2be675df92a9cab7c662bc73a6491e0 /ext/mysqlnd/mysqlnd_net.c
parent35dd200430994b1b2807633e5d5dd3370b59633e (diff)
parent73fe4186370d8ca8bd0b8a4a8f995852cb42fa75 (diff)
downloadphp-git-bfc1ae07bec3bda6dc0522da50b35ba093d4247c.tar.gz
Merge branch 'phpng' of https://git.php.net/repository/php-src into phpng
Diffstat (limited to 'ext/mysqlnd/mysqlnd_net.c')
-rw-r--r--ext/mysqlnd/mysqlnd_net.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/mysqlnd/mysqlnd_net.c b/ext/mysqlnd/mysqlnd_net.c
index 76e49a5d9d..84757f88c1 100644
--- a/ext/mysqlnd/mysqlnd_net.c
+++ b/ext/mysqlnd/mysqlnd_net.c
@@ -160,7 +160,7 @@ MYSQLND_METHOD(mysqlnd_net, open_tcp_or_unix)(MYSQLND_NET * const net, const cha
unsigned int streams_flags = STREAM_XPORT_CLIENT | STREAM_XPORT_CONNECT;
char * hashed_details = NULL;
int hashed_details_len = 0;
- char * errstr = NULL;
+ zend_string *errstr = NULL;
int errcode = 0;
struct timeval tv;
dtor_func_t origin_dtor;
@@ -190,10 +190,10 @@ MYSQLND_METHOD(mysqlnd_net, open_tcp_or_unix)(MYSQLND_NET * const net, const cha
mnd_sprintf_free(hashed_details);
}
errcode = CR_CONNECTION_ERROR;
- SET_CLIENT_ERROR(*error_info, errcode? errcode:CR_CONNECTION_ERROR, UNKNOWN_SQLSTATE, errstr);
+ SET_CLIENT_ERROR(*error_info, errcode? errcode:CR_CONNECTION_ERROR, UNKNOWN_SQLSTATE, errstr->val);
if (errstr) {
/* no mnd_ since we don't allocate it */
- efree(errstr);
+ STR_RELEASE(errstr);
}
DBG_RETURN(NULL);
}