]> granicus.if.org Git - php/commitdiff
Fixed memory leak
authorDmitry Stogov <dmitry@zend.com>
Fri, 28 Feb 2014 09:43:52 +0000 (13:43 +0400)
committerDmitry Stogov <dmitry@zend.com>
Fri, 28 Feb 2014 09:43:52 +0000 (13:43 +0400)
Zend/zend_closures.c

index 46894c6106a10510c1c6b77e9e8ad7ebd81076ca..85273d5a06f53ccf7f71989def47b77ad1d6b82f 100644 (file)
@@ -339,7 +339,9 @@ static HashTable *zend_closure_get_debug_info(zval *object, int *is_temp TSRMLS_
                                }
                                info_len = zend_spprintf(&info, 0, "%s",
                                                                i >= required ? "<optional>" : "<required>");                           
-                               add_assoc_stringl_ex(&val, name, name_len, info, info_len, 0);
+//??? TODO: avoid reallocation
+                               add_assoc_stringl_ex(&val, name, name_len, info, info_len, 1);
+                               efree(info);
                                efree(name);
                                arg_info++;
                        }