andrey Thu Nov 8 17:29:06 2007 UTC
Modified files:
/php-src/ext/mysqlnd mysqlnd.c
Log:
Fix segfault in debug build
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd.c?r1=1.6&r2=1.7&diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd.c
diff -u php-src/ext/mysqlnd/mysqlnd.c:1.6 php-src/ext/mysqlnd/mysqlnd.c:1.7
--- php-src/ext/mysqlnd/mysqlnd.c:1.6 Tue Oct 23 10:17:39 2007
+++ php-src/ext/mysqlnd/mysqlnd.c Thu Nov 8 17:29:06 2007
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: mysqlnd.c,v 1.6 2007/10/23 10:17:39 andrey Exp $ */
+/* $Id: mysqlnd.c,v 1.7 2007/11/08 17:29:06 andrey Exp $ */
#include "php.h"
#include "mysqlnd.h"
#include "mysqlnd_wireprotocol.h"
@@ -571,6 +571,10 @@
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 @@
mnd_efree(hashed_details);
}
- if (errstr || !conn->net.stream) {
- goto err;
- }
-
if (conn->options.timeout_read)
{
tv.tv_sec = conn->options.timeout_read;
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php