Skip to content

Commit

Permalink
Fix leak in guards patch
Browse files Browse the repository at this point in the history
  • Loading branch information
nikic committed Apr 28, 2016
1 parent 033a802 commit 357ee43
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Zend/zend_object_handlers.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit 357ee43

Please sign in to comment.