com php-src: cosure->debug_info is not a subject for GC: Zend/zend_closures.c
| From: | Dmitry Stogov | Date: | Fri, 21 Mar 2014 17:35:47 +0000 |
| Subject: | com php-src: cosure->debug_info is not a subject for GC: Zend/zend_closures.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-77566@lists.php.net to get a copy of this message | ||
Commit: 5c169160e6a950dc3e5e36363947612bf26cc652
Author: Dmitry Stogov <dmitry@zend.com> Fri, 21 Mar 2014 21:35:47 +0400
Parents: a4280c340bf7c127f97fd0d14ec107d60d6f1c9c
Branches: phpng
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=5c169160e6a950dc3e5e36363947612bf26cc652
Log:
cosure->debug_info is not a subject for GC
Changed paths:
M Zend/zend_closures.c
Diff:
diff --git a/Zend/zend_closures.c b/Zend/zend_closures.c
index 6180892..9b4c2b4 100644
--- a/Zend/zend_closures.c
+++ b/Zend/zend_closures.c
@@ -359,6 +359,12 @@ static HashTable *zend_closure_get_gc(zval *obj, zval **table, int *n
TSRMLS_DC)
{
zend_closure *closure = (zend_closure *)Z_OBJ_P(obj);
+ if (closure->debug_info != NULL) {
+ zend_hash_destroy(closure->debug_info);
+ efree(closure->debug_info);
+ closure->debug_info = NULL;
+ }
+
*table = Z_TYPE(closure->this_ptr) != IS_NULL ? &closure->this_ptr : NULL;
*n = Z_TYPE(closure->this_ptr) != IS_NULL ? 1 : 0;
return (closure->func.type == ZEND_USER_FUNCTION) ?