summaryrefslogtreecommitdiff
path: root/Zend/zend_opcode.c
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/zend_opcode.c')
-rw-r--r--Zend/zend_opcode.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/Zend/zend_opcode.c b/Zend/zend_opcode.c
index 619c79168e..32bc402269 100644
--- a/Zend/zend_opcode.c
+++ b/Zend/zend_opcode.c
@@ -78,6 +78,7 @@ void init_op_array(zend_op_array *op_array, zend_uchar type, int initial_ops_siz
op_array->arg_types = NULL;
op_array->scope = NULL;
+ op_array->namespace = NULL;
op_array->brk_cont_array = NULL;
op_array->last_brk_cont = 0;
@@ -166,9 +167,25 @@ ZEND_API void destroy_zend_class(zend_class_entry **pce)
zend_hash_destroy(&ce->class_table);
free(ce);
break;
+ case ZEND_NAMESPACE:
+ destroy_zend_namespace(pce);
+ break;
}
}
+ZEND_API void destroy_zend_namespace(zend_namespace **pns)
+{
+ zend_namespace *ns = *pns;
+ zend_hash_destroy(&ns->function_table);
+ zend_hash_destroy(&ns->class_table);
+ zend_hash_destroy(&ns->constants_table);
+ zend_hash_destroy(ns->static_members);
+ FREE_HASHTABLE(ns->static_members);
+ destroy_op_array(ns->constructor);
+ efree(ns->constructor);
+ efree(ns->name);
+ efree(ns);
+}
void zend_class_add_ref(zend_class_entry **ce)
{