]> granicus.if.org Git - php/commitdiff
- Move the field access behind the check
authorJohannes Schlüter <johannes@php.net>
Tue, 17 May 2011 00:16:57 +0000 (00:16 +0000)
committerJohannes Schlüter <johannes@php.net>
Tue, 17 May 2011 00:16:57 +0000 (00:16 +0000)
# Only called from one place where the connection is checked, but
# playing safe, again (parfait)

ext/mysqlnd/mysqlnd_wireprotocol.c

index 874f430d468b3306021c2f2d54bebf574ee05428..61582a3aab503497ffbca0e57ecb8f4b8ba303a1 100644 (file)
@@ -2112,11 +2112,10 @@ mysqlnd_protocol_init(zend_bool persistent TSRMLS_DC)
 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;