johannes                                 Tue, 17 May 2011 00:16:57 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=311120

Log:
- Move the field access behind the check
# Only called from one place where the connection is checked, but
# playing safe, again (parfait)

Changed paths:
    U   php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_wireprotocol.c
    U   php/php-src/branches/PHP_5_4/ext/mysqlnd/mysqlnd_wireprotocol.c
    U   php/php-src/trunk/ext/mysqlnd/mysqlnd_wireprotocol.c

Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_wireprotocol.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_wireprotocol.c     
2011-05-16 23:43:12 UTC (rev 311119)
+++ php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_wireprotocol.c     
2011-05-17 00:16:57 UTC (rev 311120)
@@ -2112,11 +2112,10 @@
 PHPAPI void
 mysqlnd_protocol_free(MYSQLND_PROTOCOL * const protocol TSRMLS_DC)
 {
-       zend_bool pers = protocol->persistent;
-
        DBG_ENTER("mysqlnd_protocol_free");

        if (protocol) {
+               zend_bool pers = protocol->persistent;
                mnd_pefree(protocol, pers);
        }
        DBG_VOID_RETURN;

Modified: php/php-src/branches/PHP_5_4/ext/mysqlnd/mysqlnd_wireprotocol.c
===================================================================
--- php/php-src/branches/PHP_5_4/ext/mysqlnd/mysqlnd_wireprotocol.c     
2011-05-16 23:43:12 UTC (rev 311119)
+++ php/php-src/branches/PHP_5_4/ext/mysqlnd/mysqlnd_wireprotocol.c     
2011-05-17 00:16:57 UTC (rev 311120)
@@ -2380,11 +2380,10 @@
 PHPAPI void
 mysqlnd_protocol_free(MYSQLND_PROTOCOL * const protocol TSRMLS_DC)
 {
-       zend_bool pers = protocol->persistent;
-
        DBG_ENTER("mysqlnd_protocol_free");

        if (protocol) {
+               zend_bool pers = protocol->persistent;
                mnd_pefree(protocol, pers);
        }
        DBG_VOID_RETURN;

Modified: php/php-src/trunk/ext/mysqlnd/mysqlnd_wireprotocol.c
===================================================================
--- php/php-src/trunk/ext/mysqlnd/mysqlnd_wireprotocol.c        2011-05-16 
23:43:12 UTC (rev 311119)
+++ php/php-src/trunk/ext/mysqlnd/mysqlnd_wireprotocol.c        2011-05-17 
00:16:57 UTC (rev 311120)
@@ -2380,11 +2380,10 @@
 PHPAPI void
 mysqlnd_protocol_free(MYSQLND_PROTOCOL * const protocol TSRMLS_DC)
 {
-       zend_bool pers = protocol->persistent;
-
        DBG_ENTER("mysqlnd_protocol_free");

        if (protocol) {
+               zend_bool pers = protocol->persistent;
                mnd_pefree(protocol, pers);
        }
        DBG_VOID_RETURN;

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to