1
0
mirror of https://github.com/php/php-src.git synced 2026-04-21 06:51:18 +02:00

Fixed segfault

This commit is contained in:
Xinchen Hui
2014-09-29 12:06:56 +08:00
parent 3fd8a76f26
commit f248b17e07
+5 -3
View File
@@ -3926,9 +3926,11 @@ ZEND_API int zend_update_static_property(zend_class_entry *scope, const char *na
zval garbage;
ZVAL_COPY_VALUE(&garbage, property);
Z_ADDREF_P(value);
if (Z_ISREF_P(value)) {
SEPARATE_ZVAL(value);
if (Z_REFCOUNTED_P(value)) {
Z_ADDREF_P(value);
if (Z_ISREF_P(value)) {
SEPARATE_ZVAL(value);
}
}
ZVAL_COPY_VALUE(property, value);
zval_ptr_dtor(&garbage);