From aea4ea120fbf3539eed29363ea89242d472a0e75 Mon Sep 17 00:00:00 2001 From: Marcus Boerger Date: Sun, 10 Aug 2008 21:52:05 +0000 Subject: - Fix memleak, Zend's built-in functions get copied before we copy all functions, thus ending up in the name and param definitions copied twice because zend_register_funciton already copies them. - Also Be able to deallocate Zend's built-in functions and do so when appropriate. - After unregistering Zend's built-in functions only dl() is left and that seems to be fine. --- Zend/zend_builtin_functions.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Zend/zend_builtin_functions.c') diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index 715219a54c..bf1caf8a98 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -416,6 +416,12 @@ int zend_startup_builtin_functions(TSRMLS_D) /* {{{ */ } /* }}} */ +void zend_shutdown_builtin_functions(TSRMLS_D) /* {{{ */ +{ + zend_unregister_functions(builtin_functions, -1, NULL TSRMLS_CC); +} +/* }}} */ + /* {{{ proto string zend_version(void) U Get the version of the Zend Engine */ ZEND_FUNCTION(zend_version) -- cgit v1.2.1