summaryrefslogtreecommitdiff
path: root/Zend/zend_hash.c
diff options
context:
space:
mode:
authorNikita Popov <nikic@php.net>2016-09-27 19:48:35 +0200
committerNikita Popov <nikic@php.net>2016-09-27 19:48:50 +0200
commit21f0be4792f60d303ddd025803ac647620b2a8f1 (patch)
treeab44e895c814e779413b5635615f958c659e6752 /Zend/zend_hash.c
parent8a6b0894087cf336ed7afe9c927f9fba5623f951 (diff)
parentb7cbaa7f43d8a584e273e214209a4f7406a30029 (diff)
downloadphp-git-21f0be4792f60d303ddd025803ac647620b2a8f1.tar.gz
Merge branch 'PHP-7.0' into PHP-7.1
Diffstat (limited to 'Zend/zend_hash.c')
-rw-r--r--Zend/zend_hash.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/Zend/zend_hash.c b/Zend/zend_hash.c
index 622d94a5f5..ec9a5ba486 100644
--- a/Zend/zend_hash.c
+++ b/Zend/zend_hash.c
@@ -1420,13 +1420,17 @@ ZEND_API void ZEND_FASTCALL zend_symtable_clean(HashTable *ht)
} else if (ht->nNumUsed == ht->nNumOfElements) {
do {
i_zval_ptr_dtor(&p->val ZEND_FILE_LINE_CC);
- zend_string_release(p->key);
+ if (EXPECTED(p->key)) {
+ zend_string_release(p->key);
+ }
} while (++p != end);
} else {
do {
if (EXPECTED(Z_TYPE(p->val) != IS_UNDEF)) {
i_zval_ptr_dtor(&p->val ZEND_FILE_LINE_CC);
- zend_string_release(p->key);
+ if (EXPECTED(p->key)) {
+ zend_string_release(p->key);
+ }
}
} while (++p != end);
}