andrey          Thu Nov  8 17:29:42 2007 UTC

  Modified files:              (Branch: PHP_5_3)
    /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.5.2.3&r2=1.5.2.4&diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd.c
diff -u php-src/ext/mysqlnd/mysqlnd.c:1.5.2.3 
php-src/ext/mysqlnd/mysqlnd.c:1.5.2.4
--- php-src/ext/mysqlnd/mysqlnd.c:1.5.2.3       Tue Oct 23 10:10:18 2007
+++ php-src/ext/mysqlnd/mysqlnd.c       Thu Nov  8 17:29:42 2007
@@ -18,7 +18,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: mysqlnd.c,v 1.5.2.3 2007/10/23 10:10:18 andrey Exp $ */
+/* $Id: mysqlnd.c,v 1.5.2.4 2007/11/08 17:29:42 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

Reply via email to