]> granicus.if.org Git - php/commitdiff
MFH
authorAntony Dovgal <tony2001@php.net>
Thu, 21 Dec 2006 00:43:30 +0000 (00:43 +0000)
committerAntony Dovgal <tony2001@php.net>
Thu, 21 Dec 2006 00:43:30 +0000 (00:43 +0000)
sapi/cli/php_cli.c

index 6d8aff915c04fe817f90399d63eb3cc3c0e82258..2a9265ece947b77d779e7d41570e40e2e957437a 100644 (file)
@@ -430,6 +430,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;
        }