From 6555eb521f69c6358f77ee32b53131d6eae71d2b Mon Sep 17 00:00:00 2001 From: Andrey Hristov Date: Thu, 8 Nov 2007 17:29:06 +0000 Subject: [PATCH] Fix segfault in debug build --- ext/mysqlnd/mysqlnd.c | 8 ++++---- 1 file 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; -- 2.50.1