mirror of
https://github.com/php/php-src.git
synced 2024-11-28 04:14:26 +08:00
Fixed bug #63726 (Memleak with static properties and internal/user classes)
This commit is contained in:
parent
db6d8e2724
commit
ad553a7af2
2
NEWS
2
NEWS
@ -7,6 +7,8 @@ PHP NEWS
|
||||
#### ADD NEWS TO 5.3.21 ONLY ####
|
||||
|
||||
- Zend Engine:
|
||||
. Fixed bug #63726 (Memleak with static properties and internal/user
|
||||
classes). (Laruence)
|
||||
. Fixed bug #63635 (Segfault in gc_collect_cycles). (Dmitry)
|
||||
. Fixed bug #63512 (parse_ini_file() with INI_SCANNER_RAW removes quotes
|
||||
from value). (Pierrick)
|
||||
|
@ -3472,6 +3472,8 @@ ZEND_API int zend_update_static_property(zend_class_entry *scope, char *name, in
|
||||
(*property)->value = value->value;
|
||||
if (Z_REFCOUNT_P(value) > 0) {
|
||||
zval_copy_ctor(*property);
|
||||
} else {
|
||||
efree(value);
|
||||
}
|
||||
} else {
|
||||
zval *garbage = *property;
|
||||
|
@ -437,6 +437,8 @@ static void zend_std_write_property(zval *object, zval *member, zval *value TSRM
|
||||
(*variable_ptr)->value = value->value;
|
||||
if (Z_REFCOUNT_P(value) > 0) {
|
||||
zval_copy_ctor(*variable_ptr);
|
||||
} else {
|
||||
efree(value);
|
||||
}
|
||||
zval_dtor(&garbage);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user