diff options
| author | Marcus Boerger <helly@php.net> | 2008-08-10 21:52:05 +0000 |
|---|---|---|
| committer | Marcus Boerger <helly@php.net> | 2008-08-10 21:52:05 +0000 |
| commit | aea4ea120fbf3539eed29363ea89242d472a0e75 (patch) | |
| tree | bec7914cdcc450f413c1c6ccf1f7c986c03510b6 /Zend/zend_builtin_functions.c | |
| parent | b9b83ec794f2377b25c8c407076d88a8e971c065 (diff) | |
| download | php-git-aea4ea120fbf3539eed29363ea89242d472a0e75.tar.gz | |
- 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.
Diffstat (limited to 'Zend/zend_builtin_functions.c')
| -rw-r--r-- | Zend/zend_builtin_functions.c | 6 |
1 files changed, 6 insertions, 0 deletions
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) |
