From: Zeev Suraski Date: Mon, 22 Nov 1999 20:58:56 +0000 (+0000) Subject: Fixed a leak when using automatic output buffering X-Git-Tag: PRE_RETURN_REF_PATCH~303 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9820dd092765ec451eaebafc9d3bee63c9d698a9;p=php Fixed a leak when using automatic output buffering @ Fixed a leak when using automatic output buffering (Zeev) --- diff --git a/ext/standard/output.c b/ext/standard/output.c index e1c0226afd..0eecddb40f 100644 --- a/ext/standard/output.c +++ b/ext/standard/output.c @@ -119,6 +119,7 @@ php3_module_entry output_module_entry = { STANDARD_MODULE_PROPERTIES }; + PHP_RINIT_FUNCTION(output) { php_output_startup(); diff --git a/main/main.c b/main/main.c index 249390136a..c79a97389e 100644 --- a/main/main.c +++ b/main/main.c @@ -710,9 +710,6 @@ int php_request_startup(CLS_D ELS_DC PLS_DC SLS_DC) php_output_startup(); php_init_post_request_startup(PLS_C); - if (PG(output_buffering)) { - php_start_ob_buffering(); - } #if APACHE /* * For the Apache module version, this bit of code registers a cleanup @@ -740,6 +737,10 @@ int php_request_startup(CLS_D ELS_DC PLS_DC SLS_DC) zend_activate(CLS_C ELS_CC); sapi_activate(SLS_C); + if (PG(output_buffering)) { + php_start_ob_buffering(); + } + if (SG(request_info).auth_user) { zval *auth_user; diff --git a/main/output.c b/main/output.c index e1c0226afd..0eecddb40f 100644 --- a/main/output.c +++ b/main/output.c @@ -119,6 +119,7 @@ php3_module_entry output_module_entry = { STANDARD_MODULE_PROPERTIES }; + PHP_RINIT_FUNCTION(output) { php_output_startup();