]> granicus.if.org Git - php/commitdiff
cosure->debug_info is not a subject for GC
authorDmitry Stogov <dmitry@zend.com>
Fri, 21 Mar 2014 17:35:47 +0000 (21:35 +0400)
committerDmitry Stogov <dmitry@zend.com>
Fri, 21 Mar 2014 17:35:47 +0000 (21:35 +0400)
Zend/zend_closures.c

index 61808927f1d44106c4dbedc2f238f474de34044b..9b4c2b4bceb44c7f6f619c0f43282432484ec489 100644 (file)
@@ -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) ?