]> granicus.if.org Git - php/commitdiff
- Move the access behind the check.
authorJohannes Schlüter <johannes@php.net>
Mon, 16 May 2011 10:15:28 +0000 (10:15 +0000)
committerJohannes Schlüter <johannes@php.net>
Mon, 16 May 2011 10:15:28 +0000 (10:15 +0000)
# I can't find an unsafe call, but let's play safe

ext/mysqlnd/mysqlnd_net.c

index 8c1846657d49cdeec8ceafec12941fb190654d64..600a650804e076bf4e3527c56a8623a45a3087cc 100644 (file)
@@ -906,11 +906,11 @@ mysqlnd_net_init(zend_bool persistent TSRMLS_DC)
 PHPAPI void
 mysqlnd_net_free(MYSQLND_NET * const net TSRMLS_DC)
 {
-       zend_bool pers = net->persistent;
-
        DBG_ENTER("mysqlnd_net_free");
 
        if (net) {
+               zend_bool pers = net->persistent;
+
                net->m.free_contents(net TSRMLS_CC);
                if (net->cmd_buffer.buffer) {
                        DBG_INF("Freeing cmd buffer");