summaryrefslogtreecommitdiff
path: root/ext/mysqlnd/mysqlnd.c
diff options
context:
space:
mode:
authorAndrey Hristov <andrey@php.net>2007-11-08 17:29:42 +0000
committerAndrey Hristov <andrey@php.net>2007-11-08 17:29:42 +0000
commit6d2bcdacc1ae3621a01862044e71b65e6d46eb83 (patch)
treeceba411c8884e89046d3ca88929faa8b44755633 /ext/mysqlnd/mysqlnd.c
parentc8494a81a799fc71cd8caafc119e99b14af6e484 (diff)
downloadphp-git-6d2bcdacc1ae3621a01862044e71b65e6d46eb83.tar.gz
Fix segfault in debug build
Diffstat (limited to 'ext/mysqlnd/mysqlnd.c')
-rw-r--r--ext/mysqlnd/mysqlnd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/mysqlnd/mysqlnd.c b/ext/mysqlnd/mysqlnd.c
index 5d4e3c5988..302ee4eb52 100644
--- a/ext/mysqlnd/mysqlnd.c
+++ b/ext/mysqlnd/mysqlnd.c
@@ -571,6 +571,10 @@ PHPAPI MYSQLND *mysqlnd_connect(MYSQLND *conn,
NULL /*ctx*/, &errstr, &errcode);
DBG_INF_FMT("stream=%p", conn->net.stream);
+ if (errstr || !conn->net.stream) {
+ goto err;
+ }
+
if (hashed_details) {
/*
If persistent, the streams register it in EG(persistent_list).
@@ -597,10 +601,6 @@ PHPAPI MYSQLND *mysqlnd_connect(MYSQLND *conn,
mnd_efree(hashed_details);
}
- if (errstr || !conn->net.stream) {
- goto err;
- }
-
if (conn->options.timeout_read)
{
tv.tv_sec = conn->options.timeout_read;