fix leaks with php -d option=value -c /path -h

This commit is contained in:
Antony Dovgal 2006-09-15 08:18:10 +00:00
parent 4bbeaa70fa
commit 2486c2df50

View File

@ -628,6 +628,7 @@ int main(int argc, char *argv[])
#endif
cli_sapi_module.ini_defaults = sapi_cli_ini_defaults;
cli_sapi_module.php_ini_path_override = NULL;
cli_sapi_module.phpinfo_as_text = 1;
sapi_startup(&cli_sapi_module);
@ -1248,12 +1249,6 @@ int main(int argc, char *argv[])
}
}
if (cli_sapi_module.php_ini_path_override) {
free(cli_sapi_module.php_ini_path_override);
}
if (cli_sapi_module.ini_entries) {
free(cli_sapi_module.ini_entries);
}
} zend_end_try();
out:
@ -1264,6 +1259,13 @@ out:
exit_status = EG(exit_status);
}
out_err:
if (cli_sapi_module.php_ini_path_override) {
free(cli_sapi_module.php_ini_path_override);
}
if (cli_sapi_module.ini_entries) {
free(cli_sapi_module.ini_entries);
}
if (module_started) {
php_module_shutdown(TSRMLS_C);
}