]> 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 42a97bf1153b4d06f23bf24309845a75a342cb5b..6821c5f2056328cf99756ce1a2c1458a7c5649e2 100644 (file)
@@ -905,11 +905,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");