|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
Patch bug63726.patch for Scripting Engine problem Bug #63726Patch version 2012-12-09 13:07 UTC Return to Bug #63726 | Download this patchThis patch is obsolete Obsoleted by patches: Patch Revisions:
Developer: laruence@php.net
diff --git a/Zend/zend_API.c b/Zend/zend_API.c
index c3d62c2..cd6684f 100644
--- a/Zend/zend_API.c
+++ b/Zend/zend_API.c
@@ -3708,6 +3708,8 @@ ZEND_API int zend_update_static_property(zend_class_entry *scope, const char *na
(*property)->value = value->value;
if (Z_REFCOUNT_P(value) > 0) {
zval_copy_ctor(*property);
+ } else if (Z_REFCOUNT_P(value) == 0) {
+ efree(value);
}
} else {
zval *garbage = *property;
diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c
index d82493a..c861565 100644
--- a/Zend/zend_object_handlers.c
+++ b/Zend/zend_object_handlers.c
@@ -539,6 +539,8 @@ ZEND_API void zend_std_write_property(zval *object, zval *member, zval *value, c
(*variable_ptr)->value = value->value;
if (Z_REFCOUNT_P(value) > 0) {
zval_copy_ctor(*variable_ptr);
+ } else if (Z_REFCOUNT_P(value) == 0) {
+ efree(value);
}
zval_dtor(&garbage);
} else {
|
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 10 10:00:01 2025 UTC |