summaryrefslogtreecommitdiff
path: root/ext/mysqlnd
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
commit1eb770497469d74c0f73123dc58e7338229c22b0 (patch)
treea1bf408b76b218f3cea915448338d4c97542c3d0 /ext/mysqlnd
parent2ea7c05d7541bd25878da85e433232c208d5d372 (diff)
downloadphp-git-1eb770497469d74c0f73123dc58e7338229c22b0.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')
-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 874f430d46..61582a3aab 100644
--- a/ext/mysqlnd/mysqlnd_wireprotocol.c
+++ b/ext/mysqlnd/mysqlnd_wireprotocol.c
@@ -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;