[PATCH] memory leak of registered_zend_ini_directives table
| Bug #27640 | [PATCH] memory leak of registered_zend_ini_directives table | ||||
|---|---|---|---|---|---|
| Submitted: | 2004-03-18 16:42 UTC | Modified: | 2004-05-23 18:06 UTC | ||
| From: | msisolak at yahoo dot com | Assigned: | andi (profile) | ||
| Status: | Closed | Package: | Scripting Engine problem | ||
| PHP Version: | 5.0.0RC1 | OS: | Windows 2000 | ||
| Private report: | No | CVE-ID: | None | ||
[2004-03-18 16:42 UTC] msisolak at yahoo dot com
Description: ------------ Under thread-safe builds the registered_zend_ini_directives hash table leaks (verified under Win32 with a _CrtDumpMemoryLeaks() call at the bottom of the CLI main() function). There is a zend_ini_global_shutdown() function in zend_ini.c to free this table, but it never gets called. A suggested patch: --- main.c.orig Thu Mar 18 16:34:09 2004 +++ main.c Thu Mar 18 16:34:22 2004 @@ -1523,9 +1523,9 @@ /* close down the ini config */ php_shutdown_config(); + zend_ini_global_shutdown(TSRMLS_C); #ifndef ZTS - zend_ini_shutdown(TSRMLS_C); shutdown_memory_manager(CG(unclean_shutdown), 1 TSRMLS_CC); #endif Since registered_zend_ini_directives is the same as EG(ini_directives) under non-thread safe builds, calling zend_ini_global_shutdown() in either case should be fine. Reproduce code: --------------- Just calling "php.exe -v" caused the memory leak - no script is required.
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2004-05-23 18:06 UTC] andi@php.net