mirror of
https://github.com/php/php-src.git
synced 2025-08-18 06:58:55 +02:00
Fixed bug #68652 (segmentation fault in destructor)
This commit is contained in:
parent
890195f85c
commit
21bb33cc72
3 changed files with 50 additions and 7 deletions
|
@ -162,16 +162,16 @@ static inline void cleanup_user_class_data(zend_class_entry *ce TSRMLS_DC)
|
|||
zend_hash_apply(&ce->function_table, (apply_func_t) zend_cleanup_function_data_full TSRMLS_CC);
|
||||
}
|
||||
if (ce->static_members_table) {
|
||||
zval *static_members = ce->static_members_table;
|
||||
int count = ce->default_static_members_count;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < ce->default_static_members_count; i++) {
|
||||
if (ce->static_members_table[i]) {
|
||||
zval *p = ce->static_members_table[i];
|
||||
ce->static_members_table[i] = NULL;
|
||||
zval_ptr_dtor(&p);
|
||||
}
|
||||
ce->default_static_members_count = 0;
|
||||
ce->default_static_members_table = ce->static_members_table = NULL;
|
||||
for (i = 0; i < count; i++) {
|
||||
zval_ptr_dtor(&static_members[i]);
|
||||
}
|
||||
ce->static_members_table = NULL;
|
||||
efree(static_members);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue