From 5dd7f27f0bcc6849e538e2eb051ed0953f609669 Mon Sep 17 00:00:00 2001 From: Andi Gutmans Date: Fri, 30 Apr 1999 23:32:03 +0000 Subject: [PATCH] - Free refcount when destroying the last class reference. --- Zend/zend_opcode.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Zend/zend_opcode.c b/Zend/zend_opcode.c index 1e113c500e..c1b93a9251 100644 --- a/Zend/zend_opcode.c +++ b/Zend/zend_opcode.c @@ -120,11 +120,13 @@ ZEND_API void destroy_zend_class(zend_class_entry *ce) switch (ce->type) { case ZEND_USER_CLASS: efree(ce->name); + efree(ce->refcount); zend_hash_destroy(&ce->function_table); zend_hash_destroy(&ce->default_properties); break; case ZEND_INTERNAL_CLASS: free(ce->name); + free(ce->refcount); zend_hash_destroy(&ce->function_table); zend_hash_destroy(&ce->default_properties); break; -- 2.50.1