1
0
Fork 0

processor: reset refcount to 0 to kill leak warning

git-svn-id: svn://svn.lighttpd.net/xcache/trunk@217 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
1.2
Xuefer 17 years ago
parent 7e476dc403
commit f4b67d768d

@ -277,6 +277,18 @@ static void xc_fix_static_members(xc_processor_t *processor, zend_class_entry *d
}
/* }}} */
#endif
int xc_hash_reset_zval_refcount_applyer(void *pDest TSRMLS_DC) /* {{{ */
{
zval **zv = (zval **) pDest;
ZVAL_REFCOUNT(*zv) = 1;
return ZEND_HASH_APPLY_KEEP;
}
/* }}} */
static void xc_hash_reset_zval_refcount(HashTable *hash TSRMLS_DC) /* {{{ */
{
zend_hash_apply(hash, xc_hash_reset_zval_refcount_applyer TSRMLS_CC);
}
/* }}} */
/* {{{ call op_array ctor handler */
extern zend_bool xc_have_op_array_ctor;
static void xc_zend_extension_op_array_ctor_handler(zend_extension *extension, zend_op_array *op_array TSRMLS_DC)

@ -294,6 +294,7 @@ DEF_STRUCT_P_FUNC(`zend_class_entry', , `dnl {{{
#endif
STRUCT(HashTable, default_properties, HashTable_zval_ptr)
IFSTORE(`xc_hash_reset_zval_refcount(&dst->default_properties TSRMLS_CC);')
IFCOPY(`dst->builtin_functions = src->builtin_functions;')
DONE(builtin_functions)
#ifdef ZEND_ENGINE_2
@ -307,6 +308,7 @@ DEF_STRUCT_P_FUNC(`zend_class_entry', , `dnl {{{
STRUCT_P(HashTable, static_members, IFCALCSTORE(HashTable_zval_ptr_static_member_check, HashTable_zval_ptr))
# endif
STRUCT(HashTable, constants_table, HashTable_zval_ptr)
IFSTORE(`xc_hash_reset_zval_refcount(&dst->constants_table TSRMLS_CC);')
dnl runtime binding: ADD_INTERFACE will deal with it
IFRESTORE(`

Loading…
Cancel
Save