tony2001 Fri Sep 15 08:18:10 2006 UTC Modified files: /php-src/sapi/cli php_cli.c Log: fix leaks with `php -d option=value -c /path -h` http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/php_cli.c?r1=1.161&r2=1.162&diff_format=u Index: php-src/sapi/cli/php_cli.c diff -u php-src/sapi/cli/php_cli.c:1.161 php-src/sapi/cli/php_cli.c:1.162 --- php-src/sapi/cli/php_cli.c:1.161 Tue Aug 22 12:05:10 2006 +++ php-src/sapi/cli/php_cli.c Fri Sep 15 08:18:10 2006 @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_cli.c,v 1.161 2006/08/22 12:05:10 dmitry Exp $ */ +/* $Id: php_cli.c,v 1.162 2006/09/15 08:18:10 tony2001 Exp $ */ #include "php.h" #include "php_globals.h" @@ -628,6 +628,7 @@ #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 @@ } } - 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 @@ 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); }
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php