diff options
author | Xinchen Hui <laruence@php.net> | 2014-08-14 11:52:46 +0800 |
---|---|---|
committer | Xinchen Hui <laruence@php.net> | 2014-08-14 11:52:46 +0800 |
commit | bfc1ae07bec3bda6dc0522da50b35ba093d4247c (patch) | |
tree | ce6d954be2be675df92a9cab7c662bc73a6491e0 /ext/mysqlnd/mysqlnd_net.c | |
parent | 35dd200430994b1b2807633e5d5dd3370b59633e (diff) | |
parent | 73fe4186370d8ca8bd0b8a4a8f995852cb42fa75 (diff) | |
download | php-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.c | 6 |
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); } |