com php-src: Fix leak in guards patch: Zend/zend_object_han dlers.c
| From: | Nikita Popov | Date: | Thu, 28 Apr 2016 17:20:51 +0000 |
| Subject: | com php-src: Fix leak in guards patch: Zend/zend_object_han dlers.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-91923@lists.php.net to get a copy of this message | ||
Commit: 357ee4305ea75e40991590d2d3425689f5defb68
Author: Nikita Popov <nikic@php.net> Thu, 28 Apr 2016 19:19:28 +0200
Parents: 033a8020c28024231806548d3fc2c8f3893b3195
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=357ee4305ea75e40991590d2d3425689f5defb68
Log:
Fix leak in guards patch
Changed paths:
M Zend/zend_object_handlers.c
Diff:
diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c
index ca6ec6a..c74ef75 100644
--- a/Zend/zend_object_handlers.c
+++ b/Zend/zend_object_handlers.c
@@ -543,7 +543,9 @@ static uint32_t *zend_get_property_guard(zend_object *zobj, zend_string *member)
ALLOC_HASHTABLE(guards);
zend_hash_init(guards, 8, NULL, zend_property_guard_dtor, 0);
/* mark pointer as "special" using low bit */
- zend_hash_add_new_ptr(guards, member, (void*)(((zend_uintptr_t)&zv->u2.property_guard) |
1));
+ zend_hash_add_new_ptr(guards, member,
+ (void*)(((zend_uintptr_t)&zv->u2.property_guard) | 1));
+ zend_string_release(Z_STR_P(zv));
ZVAL_ARR(zv, guards);
}
} else if (EXPECTED(Z_TYPE_P(zv) == IS_ARRAY)) {