summaryrefslogtreecommitdiff
path: root/sapi/cli/php_cli.c
diff options
context:
space:
mode:
authorAntony Dovgal <tony2001@php.net>2006-12-21 00:47:02 +0000
committerAntony Dovgal <tony2001@php.net>2006-12-21 00:47:02 +0000
commit41b55d9b78e0e400cc06a8d62b24c54ffb2dd89a (patch)
treeadf614c4b31c3be1a37b3242a5ca87b76ac0ecc5 /sapi/cli/php_cli.c
parent0abe62e0271a62d0e8c53c540d466267a045797a (diff)
downloadphp-git-41b55d9b78e0e400cc06a8d62b24c54ffb2dd89a.tar.gz
MFH
Diffstat (limited to 'sapi/cli/php_cli.c')
-rw-r--r--sapi/cli/php_cli.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c
index f8a81080e2..d71f9e5eff 100644
--- a/sapi/cli/php_cli.c
+++ b/sapi/cli/php_cli.c
@@ -474,6 +474,12 @@ static void cli_register_file_handles(TSRMLS_D)
s_err = php_stream_open_wrapper_ex("php://stderr", "wb", 0, NULL, sc_err);
if (s_in==NULL || s_out==NULL || s_err==NULL) {
+ FREE_ZVAL(zin);
+ FREE_ZVAL(zout);
+ FREE_ZVAL(zerr);
+ if (s_in) php_stream_close(s_in);
+ if (s_out) php_stream_close(s_out);
+ if (s_err) php_stream_close(s_err);
return;
}