Don't report leak on unclean_shutdown during startup

In particular if an invalid ini option is specified.
This commit is contained in:
Nikita Popov committed 2021-04-09 21:16:02 +02:00
1 parent dc402cb0fc
commit cbf3240d91
1 file changed
+1 -1
+1 -1
View File
@@ -2322,7 +2322,7 @@ int php_module_startup(sapi_module_struct *sf, zend_module_entry *additional_mod
/* Don't leak errors from startup into the per-request phase. */
clear_last_error();
shutdown_memory_manager(!PG(report_memleaks), 0);
shutdown_memory_manager(!PG(report_memleaks) || CG(unclean_shutdown), 0);
virtual_cwd_activate();
zend_interned_strings_switch_storage(1);