summaryrefslogtreecommitdiff
path: root/ext/mysqlnd/mysqlnd_wireprotocol.c
diff options
context:
space:
mode:
authorJohannes Schlüter <johannes@php.net>2011-05-17 00:16:57 +0000
committerJohannes Schlüter <johannes@php.net>2011-05-17 00:16:57 +0000
commitb83b4880d3725686fd4c70163428cb7013df310a (patch)
tree33fb155d0752ff0f19839cb081f474d177df7114 /ext/mysqlnd/mysqlnd_wireprotocol.c
parentbe6170c30d6c476c452935457b6c66ca878e147a (diff)
downloadphp-git-b83b4880d3725686fd4c70163428cb7013df310a.tar.gz
- Move the field access behind the check
# Only called from one place where the connection is checked, but # playing safe, again (parfait)
Diffstat (limited to 'ext/mysqlnd/mysqlnd_wireprotocol.c')
-rw-r--r--ext/mysqlnd/mysqlnd_wireprotocol.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/ext/mysqlnd/mysqlnd_wireprotocol.c b/ext/mysqlnd/mysqlnd_wireprotocol.c
index 795e0cd410..ff354eec3d 100644
--- a/ext/mysqlnd/mysqlnd_wireprotocol.c
+++ b/ext/mysqlnd/mysqlnd_wireprotocol.c
@@ -2380,11 +2380,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;