From 41b55d9b78e0e400cc06a8d62b24c54ffb2dd89a Mon Sep 17 00:00:00 2001 From: Antony Dovgal Date: Thu, 21 Dec 2006 00:47:02 +0000 Subject: [PATCH] MFH --- main/streams/memory.c | 1 + sapi/cli/php_cli.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/main/streams/memory.c b/main/streams/memory.c index d2b2070477..8d7247c7d7 100644 --- a/main/streams/memory.c +++ b/main/streams/memory.c @@ -688,6 +688,7 @@ static php_stream * php_stream_url_wrap_rfc2397(php_stream_wrapper *wrapper, cha ts->mode = mode && mode[0] == 'r' ? TEMP_STREAM_READONLY : 0; ts->meta = meta; } + efree(comma); return stream; } 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; } -- 2.50.1